Skip to content

Commit

Permalink
support node_modules in app
Browse files Browse the repository at this point in the history
  • Loading branch information
hefangshi committed Apr 20, 2016
1 parent 31bd8c7 commit 830ab48
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"fis": "1.9.45",
"fis-parser-bdtmpl": "0.0.3",
"fis-parser-less": "0.1.2",
"fis3": "3.3.25",
"fis3": "3.3.28",
"fis3-hook-commonjs": "0.1.12",
"fis3-parser-typescript": "0.2.2",
"liftoff": "2.1.0",
Expand Down
18 changes: 18 additions & 0 deletions yog2-fis3.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

var fis = module.exports = require('fis3');
var path = require('path');
fis.require.prefixes.unshift('yog2');
Expand All @@ -13,6 +15,18 @@ fis.set('static', '/static');
fis.set('config', '/conf');
fis.set('component.dir', '/client/components');
fis.set('project.fileType.text', 'es,ts,tsx,jsx');
fis.set('project.ignore', [
'issue.info',
'README.md',
'BCLOUD',
'GIT_COMMIT',
'fis.yml',
'cooder',
'build.sh',
'component.json',
'output/**',
'fis-conf.js'
]);

var clientRoadmap = {
// all release to $static dir
Expand Down Expand Up @@ -95,6 +109,10 @@ var serverRoadmap = {
target: 2
}),
rExt: 'js'
},
'{node_modules/**,package.json}': {
useCompile: false,
release: 'app/${namespace}/$0'
}
};

Expand Down
17 changes: 17 additions & 0 deletions yog2.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ fis.config.set('modules.preprocessor.tpl', 'components, extlang');
fis.config.set('modules.postprocessor.tpl', 'require-async');
fis.config.set('modules.postprocessor.js', 'jswrapper, require-async');

fis.config.set('project.ignore', [
'issue.info',
'README.md',
'BCLOUD',
'GIT_COMMIT',
'fis.yml',
'cooder',
'build.sh',
'component.json',
'output/**',
'fis-conf.js'
]);

// hack for server es compile

fis.config.set('typescript.server.target', 2);
Expand Down Expand Up @@ -114,6 +127,10 @@ var serverRoadmap = [{
useHash: false,
useDomain: false,
release: '${app}/${namespace}/$1'
}, {
reg:/(^\/node_modules\/(.*)|^\/package\.json)/,
useCompile: false,
release: 'app/${namespace}/$&'
}];

var commonRoadmap = [{
Expand Down

0 comments on commit 830ab48

Please sign in to comment.