Skip to content

Commit

Permalink
Merge branch 'master' of github.com:fex-team/fis3
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed Aug 19, 2015
2 parents 668f084 + 7c706f3 commit b1a7b0c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 23 deletions.
3 changes: 2 additions & 1 deletion doc/docs/api/config-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ b.js 最终分配到的规则属性是
**参数**
- selector

[glob](glob) 或者是任意正则
[glob][] 或者是任意正则

- props

Expand Down Expand Up @@ -163,3 +163,4 @@ fis.match('*.less', {
```

[文件属性]: ./config-props.md#文件属性
[glob]: ./config-glob.md
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
"npm-watch": "0.0.0",
"istanbul": "~0.2.14",
"coveralls": "2.10.0",
"fis3-deploy-local-deliver": "1.0.0"
"fis3-deploy-local-deliver": "1.0.0",
"fis3-postpackager-loader": "1.2.7",
"fis3-hook-cmd": "0.0.1"
},
"watch": {
"jsdoc": "lib/*.js"
Expand Down
43 changes: 22 additions & 21 deletions test/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -1756,7 +1756,6 @@ describe('util: _.pipe(type, callback, def)2', function (){
var file = fis.file.wrap(path.join(root, 'util','upload','main.css'));
file.useCache = false;
fis.cache.clean();
console.log(root);
fis.match('**/a.png', {
useHash: false,
release: '/static/$0'
Expand All @@ -1765,37 +1764,42 @@ describe('util: _.pipe(type, callback, def)2', function (){
//fis.compile(file);
//expect(file.getContent()).to.be.equal(fis.util.read(path.join(root, 'util','upload', 'maintar.css')));
});
});


function release(opts, cb) {
opts = opts || {};

_release(opts, function(error, info) {
_deploy(info, cb);
});
}
});

//用例没问题,但是运行报错
//describe('util: more deploy', function (){
// var root = path.join(__dirname, 'fis3_test_cmd');
// fis.project.setProjectRoot(root);
// function release(opts, cb) {
// opts = opts || {};
//
// _release(opts, function(error, info) {
// _deploy(info, cb);
// });
// };
// beforeEach(function() {
//
// var root = path.join(__dirname, 'fis3_test_cmd');
// fis.project.setProjectRoot(root);
// fis.config.init(fis.config.DEFALUT_SETTINGS);
// //fis.compile.setup();
// //process.env.NODE_ENV = 'dev';
// // default settings. fis3 release
// var root2 = path.join(__dirname, 'xpy');
// _.del(root2);
// var root3 = path.join(__dirname, 'xpy2');
// _.del(root3);
// fis.match('*', {
// fis.config.match('*', {
// deploy: fis.plugin('local-deliver', {
// to: root2
// })
// });
// fis.match('*', {
// fis.config.match('*', {
// deploy: fis.plugin('local-deliver', {
// to: root3
// })
// });
// fis.hook('cmd', {
//
// fis.config.hook('cmd', {
// baseUrl: ".",
// forwardDeclaration: true,//依赖前置,
// skipBuiltinModules: false,
Expand All @@ -1821,7 +1825,7 @@ function release(opts, cb) {
// }
// }
// });
// fis.match('::packager', {
// fis.config.match('::packager', {
// postpackager: fis.plugin('loader', {
// //allInOne: {
// // ignore: '**/a.js',
Expand All @@ -1844,7 +1848,7 @@ function release(opts, cb) {
// });
//// fis3 release production
// fis
// .match('**', {
// .config.match('**', {
// useHash: false,
// release: '/static/$0'
// // domain: 'http://aaaaa.baidu.com/xpy'
Expand Down Expand Up @@ -1891,11 +1895,10 @@ function release(opts, cb) {
// var file = fis.file.wrap(pathx);
// var con = file.getContent();
//
// //console.log(JSON.parse(con).res["demo.js"].deps);
// var xpath = JSON.stringify(JSON.parse(con).res["demo.js"].deps);
// console.log(pathx);
// expect(xpath).to.equal('["demo3.js"]');
//
// //console.log(JSON.parse(con).res["init.js"].deps);
// var xpath = JSON.stringify(JSON.parse(con).res["init.js"].deps);
// expect(xpath).to.equal('["module/jquery.js","module/data.js","module/b.js"]');
//
Expand All @@ -1909,11 +1912,9 @@ function release(opts, cb) {
// var file2 = fis.file.wrap(pathx2);
// var con2 = file2.getContent();
//
// //console.log(JSON.parse(con).res["demo.js"].deps);
// var xpath2 = JSON.stringify(JSON.parse(con2).res["demo.js"].deps);
// expect(xpath2).to.equal('["demo3.js"]');
//
// //console.log(JSON.parse(con).res["init.js"].deps);
// var xpath3 = JSON.stringify(JSON.parse(con2).res["init.js"].deps);
// expect(xpath3).to.equal('["module/jquery.js","module/data.js","module/b.js"]');
//
Expand Down

0 comments on commit b1a7b0c

Please sign in to comment.