This commit is contained in:
syuilo 2017-01-14 01:16:30 +09:00
parent 6cca8577c9
commit 7363014081
8 changed files with 9 additions and 33 deletions

View file

@ -18,7 +18,6 @@ import stylus = require('gulp-stylus');
import cssnano = require('gulp-cssnano'); import cssnano = require('gulp-cssnano');
import * as uglify from 'gulp-uglify'; import * as uglify from 'gulp-uglify';
import ls = require('browserify-livescript'); import ls = require('browserify-livescript');
import aliasify = require('aliasify');
import riotify = require('riotify'); import riotify = require('riotify');
import transformify = require('syuilo-transformify'); import transformify = require('syuilo-transformify');
import pug = require('gulp-pug'); import pug = require('gulp-pug');
@ -142,27 +141,6 @@ gulp.task('cleanall', ['clean'], cb =>
gulp.task('default', ['build']); gulp.task('default', ['build']);
const aliasifyConfig = {
aliases: {
'fetch': './node_modules/whatwg-fetch/fetch.js',
'page': './node_modules/page/page.js',
'NProgress': './node_modules/nprogress/nprogress.js',
'velocity': './node_modules/velocity-animate/velocity.js',
'chart.js': './node_modules/chart.js/src/chart.js',
'textarea-caret-position': './node_modules/textarea-caret/index.js',
'misskey-text': './src/common/text/index.js',
'nyaize': './node_modules/nyaize/built/index.js',
'strength.js': './node_modules/syuilo-password-strength/strength.js',
'cropper': './node_modules/cropperjs/dist/cropper.js',
'Sortable': './node_modules/sortablejs/Sortable.js',
'fuck-adblock': './node_modules/fuckadblock/fuckadblock.js',
'reconnecting-websocket': './node_modules/reconnecting-websocket/dist/index.js'
},
appliesTo: {
'includeExtensions': ['.js', '.ls']
}
};
gulp.task('build:client', [ gulp.task('build:client', [
'build:ts', 'build:js', 'build:ts', 'build:js',
'build:client:scripts', 'build:client:scripts',
@ -193,7 +171,6 @@ gulp.task('build:client:scripts', async (done) => {
entries: [entry] entries: [entry]
}) })
.transform(ls) .transform(ls)
.transform(aliasify, aliasifyConfig)
.transform(transformify((source, file) => { .transform(transformify((source, file) => {
return source return source
.replace(/VERSION/g, `'${commit ? commit.hash : 'null'}'`) .replace(/VERSION/g, `'${commit ? commit.hash : 'null'}'`)

View file

@ -56,7 +56,6 @@
"@types/vinyl-source-stream": "0.0.28", "@types/vinyl-source-stream": "0.0.28",
"@types/websocket": "0.0.32", "@types/websocket": "0.0.32",
"accesses": "1.2.0", "accesses": "1.2.0",
"aliasify": "2.1.0",
"argv": "0.0.2", "argv": "0.0.2",
"babel-core": "6.21.0", "babel-core": "6.21.0",
"babel-polyfill": "6.20.0", "babel-polyfill": "6.20.0",

View file

@ -3,7 +3,7 @@
*/ */
const riot = require('riot'); const riot = require('riot');
require('velocity'); require('velocity-animate');
const api = require('./common/scripts/api.ls'); const api = require('./common/scripts/api.ls');
const signout = require('./common/scripts/signout.ls'); const signout = require('./common/scripts/signout.ls');
const generateDefaultUserdata = require('./common/scripts/generate-default-userdata.ls'); const generateDefaultUserdata = require('./common/scripts/generate-default-userdata.ls');
@ -18,7 +18,7 @@ require('./common/tags.ls');
document.domain = CONFIG.host; document.domain = CONFIG.host;
// ↓ iOS待ちPolyfill (SEE: http://caniuse.com/#feat=fetch) // ↓ iOS待ちPolyfill (SEE: http://caniuse.com/#feat=fetch)
require('fetch'); require('whatwg-fetch');
// ↓ NodeList、HTMLCollectionで forEach を使えるようにする // ↓ NodeList、HTMLCollectionで forEach を使えるようにする
if (NodeList.prototype.forEach === undefined) { if (NodeList.prototype.forEach === undefined) {

View file

@ -9,7 +9,7 @@ module.exports = (me) ~>
api: (require './scripts/api.ls').bind null i api: (require './scripts/api.ls').bind null i
riot.mixin \cropper do riot.mixin \cropper do
Cropper: require \cropper Cropper: require \cropperjs
riot.mixin \signout do riot.mixin \signout do
signout: require './scripts/signout.ls' signout: require './scripts/signout.ls'
@ -27,11 +27,11 @@ module.exports = (me) ~>
date-stringify: require './scripts/date-stringify.ls' date-stringify: require './scripts/date-stringify.ls'
riot.mixin \text do riot.mixin \text do
analyze: require 'misskey-text' analyze: require '../../../common/text/index.js'
compile: require './scripts/text-compiler.js' compile: require './scripts/text-compiler.js'
riot.mixin \get-password-strength do riot.mixin \get-password-strength do
get-password-strength: require 'strength.js' get-password-strength: require 'syuilo-password-strength'
riot.mixin \ui-progress do riot.mixin \ui-progress do
Progress: require './scripts/loading.ls' Progress: require './scripts/loading.ls'

View file

@ -1,4 +1,4 @@
NProgress = require 'NProgress' NProgress = require \nprogress
NProgress.configure do NProgress.configure do
trickle-speed: 500ms trickle-speed: 500ms
show-spinner: false show-spinner: false

View file

@ -2,7 +2,7 @@ riot = require \riot
module.exports = (me) ~> module.exports = (me) ~>
riot.mixin \sortable do riot.mixin \sortable do
Sortable: require \Sortable Sortable: require \sortablejs
if me? if me?
(require './scripts/stream.ls') me (require './scripts/stream.ls') me

View file

@ -1,7 +1,7 @@
# Autocomplete # Autocomplete
#================================ #================================
get-caret-coordinates = require 'textarea-caret-position' get-caret-coordinates = require 'textarea-caret'
riot = require 'riot' riot = require 'riot'
# オートコンプリートを管理するクラスです。 # オートコンプリートを管理するクラスです。

View file

@ -1,7 +1,7 @@
# FUCK AD BLOCK # FUCK AD BLOCK
#================================ #================================
require 'fuck-adblock' require \fuckadblock
dialog = require './dialog.ls' dialog = require './dialog.ls'
module.exports = ~> module.exports = ~>