Chunk vendor eliminado

This commit is contained in:
Juan Ferrer Toribio 2016-09-29 15:12:20 +02:00
parent aa85fade20
commit 123932ba64
11 changed files with 56 additions and 34 deletions

View File

@ -1 +1 @@
import {ng} from '@salix/vendor'
import {ng} from '@salix/vendor';

View File

@ -3,11 +3,11 @@ import * as util from '../util';
import * as constant from '../constants';
import template from './button.bt.html';
const DEFAULT_CLASS = ''; // clase css bootstrap. Pendiente de definir
const DEFAULT_TEXT = constant.BUTTON_NAME;
export const NAME = util.getFactoryName(constant.BUTTON_NAME + constant.BOOTSTRAPFRAMEWORK) //vnbuttonmtFactory
const _NAME = 'button';
const DEFAULT_CLASS = '';
const DEFAULT_TEXT = 'Button';
export const NAME = util.getFactoryName(_NAME + constant.BOOTSTRAP_FRAMEWORK);
export function factory() {
return {
@ -19,6 +19,6 @@ export function factory() {
typeName: 'button'
}
}
};
}
_module.factory(NAME, factory);
_module.factory(NAME, factory);

View File

@ -1,10 +1,9 @@
import {module as _module} from '../module';
import * as resolveFactory from '../resolveDefaultComponents';
import {BUTTON_NAME} from '../constants';
import * as util from '../util';
export const NAME = util.getName(BUTTON_NAME);
const _NAME = 'button';
export const NAME = util.getName(_NAME);
directive.$inject =[resolveFactory.NAME];
@ -12,7 +11,7 @@ export function directive (resolve){
return{
require:'E',
template: function(_,attr){
return resolve.getTemplate(BUTTON_NAME,attr);
return resolve.getTemplate(_NAME, attr);
}
}
}

View File

@ -3,13 +3,13 @@ import * as util from '../util';
import * as constant from '../constants';
import template from './button.mt.html';
const _NAME = 'button';
const DEFAULT_CLASS = 'mdl-button mdl-js-button mdl-button--raised';
const DEFAULT_TEXT = constant.BUTTON_NAME;
const DEFAULT_TEXT = 'Button';
export const NAME = util.getFactoryName(constant.BUTTON_NAME + constant.MATERIALDESIGNFRAMEWORK); //buttonmtFactory
export const NAME = util.getFactoryName(_NAME + constant.MATERIAL_DESIGN_FRAMEWORK);
export function factoryMt() {
export function factory() {
return {
template: template,
default: {
@ -19,6 +19,6 @@ export function factoryMt() {
typeName: 'button'
}
}
};
}
_module.factory(NAME, factoryMt);
_module.factory(NAME, factory);

View File

@ -1,10 +1,10 @@
// nombre del prefijo del proyecto
export const PREFIX ='vn'
// nombre del framework css
// Proyect prefix name
export const PREFIX ='vn';
// CSS frameworks
export const MATERIAL_DESIGN_FRAMEWORK = 'mt';
export const BOOTSTRAP_FRAMEWORK = 'bt';
// directive name
export const BUTTON_NAME ='button';
export const BUTTON_ICON_NAME ='buttonIcon';
//dependency module
export const EMPTYDEPENDECIES=[];
// Module dependencies
export const EMPTY_DEPENDECIES = [];

View File

@ -164,4 +164,4 @@ export class Interpolate
}
_module.provider(NAME,Interpolate);
_module.provider(NAME, Interpolate);

View File

@ -1,9 +1,8 @@
import {ng} from '@salix/vendor';
import {EMPTYDEPENDECIES} from './constants';
import {EMPTY_DEPENDECIES} from './constants';
import {getModuleName} from './util';
export const NAME = getModuleName('core');
export const module = ng.module(NAME,EMPTYDEPENDECIES);
export const module = ng.module(NAME,EMPTY_DEPENDECIES);

View File

@ -7,7 +7,6 @@
</div>
<body>
<script type="text/javascript" src="build/salix.vendor.js"></script>
<script type="text/javascript" src="build/salix.core.js"></script>
<script type="text/javascript" src="build/salix.app.js"></script>
</body>

26
npm-debug.log Normal file
View File

@ -0,0 +1,26 @@
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'dev' ]
2 info using npm@1.4.21
3 info using node@v4.4.7
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info predev salix-app@1.0.0
6 info dev salix-app@1.0.0
7 verbose unsafe-perm in lifecycle true
8 info salix-app@1.0.0 Failed to exec dev script
9 error salix-app@1.0.0 dev: `webpack --progress --colors --watch`
9 error Exit status 1
10 error Failed at the salix-app@1.0.0 dev script.
10 error This is most likely a problem with the salix-app package,
10 error not with npm itself.
10 error Tell the author that this fails on your system:
10 error webpack --progress --colors --watch
10 error You can get their info via:
10 error npm owner ls salix-app
10 error There is likely additional logging output above.
11 error System Linux 4.7.0-1-amd64
12 error command "/usr/bin/nodejs" "/usr/bin/npm" "run" "dev"
13 error cwd /home/juan/Proyectos/salix
14 error node -v v4.4.7
15 error npm -v 1.4.21
16 error code ELIFECYCLE
17 verbose exit [ 1, true ]

View File

@ -22,6 +22,6 @@
"raw-loader": "*"
},
"scripts": {
"build": "webpack --progress --colors"
"dev": "webpack --progress --colors --watch"
}
}
}

View File

@ -5,7 +5,6 @@ var path = require ('path');
module.exports =
{
entry: {
'salix.vendor': ['@salix/vendor'],
'salix.core': ['@salix/core'],
'salix.app': ['@salix/app']
},
@ -37,7 +36,7 @@ module.exports =
},
plugins: [
new webpack.optimize.CommonsChunkPlugin ({
name: 'salix.vendor'
name: 'salix.core'
})
]
};