This commit is contained in:
PedroHurtado 2016-10-05 08:03:43 +02:00
commit 4a05f021b6
11 changed files with 116 additions and 29 deletions

View File

@ -1,3 +1,7 @@
<<<<<<< HEAD
import {bootstrap} from './bootstrap';
import * as spliting from './spliting'
bootstrap();
=======
import {ng} from '@salix/vendor';
>>>>>>> 123932ba64bf824cbdc2bd9fe04663b2e539eea3

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);

View File

@ -1,17 +1,16 @@
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];
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,7 +1,17 @@
<<<<<<< HEAD
import * as vendors from '@salix/vendor';
import {getModuleName,getVendorDependencies} from './util';
const DEPENDENCIES = getVendorDependencies(vendors)
export const NAME = getModuleName('core');
export const module = vendors.ng.module(NAME,DEPENDENCIES);
=======
import {ng} from '@salix/vendor';
import {EMPTY_DEPENDECIES} from './constants';
import {getModuleName} from './util';
export const NAME = getModuleName('core');
export const module = ng.module(NAME,EMPTY_DEPENDECIES);
>>>>>>> 123932ba64bf824cbdc2bd9fe04663b2e539eea3

View File

@ -8,6 +8,14 @@
<div id="app">
{{1+1}}
</div>
<<<<<<< HEAD
<script type="text/javascript" src="build/salix.app.js" selector="#app"></script>
</body>
</html>
=======
<body>
<script type="text/javascript" src="build/salix.core.js"></script>
<script type="text/javascript" src="build/salix.app.js"></script>
</body>
</html>
>>>>>>> 123932ba64bf824cbdc2bd9fe04663b2e539eea3

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

@ -3,6 +3,7 @@ var webpack = require('webpack');
var path = require('path');
module.exports =
<<<<<<< HEAD
{
entry: {
'salix.app': ['@salix/app']
@ -35,4 +36,43 @@ module.exports =
]
}
};
=======
{
entry: {
'salix.core': ['@salix/core'],
'salix.app': ['@salix/app']
},
output: {
path: path.join (__dirname, 'build'),
filename: '[name].js',
publicPath: 'build/'
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel',
exclude: /node_modules/,
query: {
presets: ['es2015']
}
},{
test: /\.html$/,
loader: 'raw'
}
]
},
resolve: {
modulesDirectories: [
__dirname,
'node_modules'
]
},
plugins: [
new webpack.optimize.CommonsChunkPlugin ({
name: 'salix.core'
})
]
};
>>>>>>> 123932ba64bf824cbdc2bd9fe04663b2e539eea3