├── README.md ├── bin └── fis-webapp ├── .gitignore ├── package.json └── fis-webapp.js /README.md: -------------------------------------------------------------------------------- 1 | fis-webapp 2 | ========== 3 | 4 | webapp解决方案 5 | -------------------------------------------------------------------------------- /bin/fis-webapp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('../fis-webapp.js').cli.run(process.argv); 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /.settings 3 | /.project 4 | 5 | tmp 6 | ~* 7 | *.db 8 | *.bak 9 | *.tmp 10 | *.swp 11 | .DS_Store 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fis-webapp", 3 | "version": "0.0.7", 4 | "description": "Front End Integrated Solution for Webapp", 5 | "main": "fis-webapp.js", 6 | "bin": { 7 | "fis-webapp": "bin/fis-webapp", 8 | "fisw": "bin/fis-webapp" 9 | }, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/xiangshouding/fis-webapp.git" 16 | }, 17 | "dependencies": { 18 | "fis": "1.0.8", 19 | "fis-preprocessor-extlang": "0.0.5", 20 | "fis-postprocessor-require-async": "0.0.4", 21 | "fis-optimizer-smarty-xss": "0.0.6", 22 | "fis-optimizer-html-compress": "0.0.5", 23 | "fis-parser-bdtmpl": "0.0.2", 24 | "fis-parser-less": "0.0.8", 25 | "fis-postpackager-ext-map": "0.0.1" 26 | }, 27 | "keywords": [ 28 | "fis", 29 | "fis-webapp" 30 | ], 31 | "author": "fis", 32 | "license": "MIT" 33 | } 34 | -------------------------------------------------------------------------------- /fis-webapp.js: -------------------------------------------------------------------------------- 1 | var fis = module.exports = require('fis'); 2 | 3 | fis.cli.name = "fis-webapp"; 4 | fis.cli.info = fis.util.readJSON(__dirname + '/package.json'); 5 | 6 | fis.config.merge({ 7 | modules : { 8 | parser : { 9 | less : 'less', 10 | tmpl: 'bdtmpl' 11 | }, 12 | preprocessor: { 13 | 'tpl': 'extlang' 14 | }, 15 | optimizer : { 16 | tpl : 'smarty-xss' 17 | }, 18 | postpackager: 'ext-map' 19 | }, 20 | roadmap : { 21 | ext : { 22 | less : 'css' 23 | }, 24 | path : [ 25 | { 26 | reg : '**.tpl', 27 | isMod : true, 28 | url : '${namespace}$&', 29 | release : '/template/${namespace}$&' 30 | }, 31 | { 32 | reg : /^\/widget\/(.*\.(js|css))$/i, 33 | isMod : true, 34 | release : '/static/${namespace}/widget/$1' 35 | }, 36 | { 37 | reg : /\.tmpl$/i, 38 | release : false 39 | }, 40 | { 41 | reg: /^\/(static|config|test)\/(.*)/i, 42 | release: '/$1/${namespace}/$2' 43 | }, 44 | { 45 | reg : /^\/(plugin|server\.conf$)|\.php$/i 46 | }, 47 | { 48 | reg: "domain.conf", 49 | release: '/config/$&' 50 | }, 51 | { 52 | reg: "build.sh", 53 | release: false 54 | }, 55 | { 56 | reg : '${namespace}-map.json', 57 | release : '/config/${namespace}-map.json' 58 | }, 59 | { 60 | reg: /^.+$/, 61 | release: '/static/${namespace}$&' 62 | } 63 | ] 64 | }, 65 | settings : { 66 | parser : { 67 | bdtmpl : { 68 | LEFT_DELIMITER : '<#', 69 | RIGHT_DELIMITER : '#>' 70 | } 71 | }, 72 | postprocessor : { 73 | jswrapper: { 74 | type: 'amd' 75 | } 76 | } 77 | } 78 | }); 79 | --------------------------------------------------------------------------------