Skip to content

Commit

Permalink
Merge pull request #21 from IdanCo/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
IdanCo authored Jul 22, 2017
2 parents e7df69f + ec9217a commit 66286bf
Show file tree
Hide file tree
Showing 67 changed files with 1,295 additions and 896 deletions.
20 changes: 20 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
extends: ["plugin:angular/johnpapa", "eslint:recommended"],
"globals": {
angular: true,
alert: true,
console: true,
},
parserOptions: {
"ecmaVersion": 6,
"sourceType": "module",
},
"rules": {
"semi": [2, "always"], // end lines with semicolon
"eol-last": 2, // end files with newline
"indent": [2, 2], // indent with two spaces
"angular/file-name": 0, // not friendly to modular architecture
"no-console": 1, // useful for debugging
"angular/function-type": 0 // not friendly to modular architecture
}
};
2 changes: 1 addition & 1 deletion conf/conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ for (const pathName of Object.keys(exports.paths)) {
const joinArgs = [pathValue].concat(funcArgs);
return path.join.apply(this, joinArgs);
};
}
}
82 changes: 40 additions & 42 deletions conf/webpack.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const conf = require('./conf');

module.exports = new WebpackConfig().merge({
entry: {
app: [
app: [
`./${conf.path.src('index')}`
],
vendor: [
Expand All @@ -19,59 +19,57 @@ module.exports = new WebpackConfig().merge({
filename: '[name].js'
},
module: {
rules: [
{
test: /\.(css)$/,
loaders: ExtractTextPlugin.extract({
fallback: 'style-loader', // in case the ExtractTextPlugin is disabled, inject CSS to <HEAD>
rules:
[{
test: /\.(css)$/,
loaders: ExtractTextPlugin.extract({
fallback: 'style-loader', // in case the ExtractTextPlugin is disabled, inject CSS to <HEAD>
use: [{
loader: 'css-loader', // translates CSS into CommonJS modules
options: {
sourceMap: true
}
}]
})
},
{
test: /\.(scss)$/,
loaders: ExtractTextPlugin.extract({
fallback: 'style-loader', // in case the ExtractTextPlugin is disabled, inject CSS to <HEAD>
use: [{
loader: 'css-loader', // translates CSS into CommonJS modules
options: {
sourceMap: true
}
}, {
loader: 'sass-loader' // compiles SASS to CSS
}]
})
},
{
test: /.html$/,
use: 'html-loader'
},
{
test: /\.js$/,
exclude: /node_modules/,
use: [{
loader: 'css-loader', // translates CSS into CommonJS modules
loader: 'babel-loader', // transpile to ES5
options: {
sourceMap: true
presets: ['es2015']
}
}]
})
},
{
test: /\.(scss)$/,
loaders: ExtractTextPlugin.extract({
fallback: 'style-loader', // in case the ExtractTextPlugin is disabled, inject CSS to <HEAD>
use: [{
loader: 'css-loader', // translates CSS into CommonJS modules
options: {
sourceMap: true
}
}, {
loader: 'sass-loader' // compiles SASS to CSS
}]
})
},
{
test: /.html$/,
use: 'html-loader'
},
{
test: /\.js$/,
exclude: /node_modules/,
use: [{
loader: 'babel-loader', // transpile to ES5
options: {
presets: ['es2015']
}
}]
}
]
},
plugins: [
new webpack.ProvidePlugin({ // inject ES5 modules as global vars
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery',
Tether: 'tether',
}),

Tether: 'tether'
})
// new webpack.optimize.CommonsChunkPlugin({ // seperate vendor chunks
// name: ['vendor', 'manifest']
// }),
],
]
});
3 changes: 1 addition & 2 deletions conf/webpack.build.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const webpack = require('webpack');
const WebpackConfig = require('webpack-config').default;
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const WebpackCleanupPlugin = require('webpack-cleanup-plugin');
Expand All @@ -18,6 +17,6 @@ module.exports = new WebpackConfig()
new HtmlWebpackPlugin({ // inject styles and js to index.html
template: conf.path.src('index.html')
}),
new WebpackCleanupPlugin(),
new WebpackCleanupPlugin()
]
});
3 changes: 1 addition & 2 deletions conf/webpack.library.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const webpack = require('webpack');
const WebpackConfig = require('webpack-config').default;
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const WebpackCleanupPlugin = require('webpack-cleanup-plugin');
Expand Down Expand Up @@ -26,7 +25,7 @@ module.exports = new WebpackConfig()
},
plugins: [
new ExtractTextPlugin('library.css'),
new WebpackCleanupPlugin(),
new WebpackCleanupPlugin()
// new webpack.optimize.UglifyJsPlugin({ minimize: true })
]
});
7 changes: 7 additions & 0 deletions conf/webpack.serve.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ module.exports = new WebpackConfig()
app: [`webpack-dev-server/client?http://localhost:${conf.servePort}/`, 'webpack/hot/dev-server']
},
devtool: 'inline-source-map', // make sure source maps are created
module: {
rules: [{
test: /\.js$/,
exclude: /node_modules/,
loader: 'eslint-loader'
}]
},
plugins: [
new webpack.HotModuleReplacementPlugin(), // enable hot module replacement
new webpack.NamedModulesPlugin(), // add names to modules
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ngbs-test .css-test {
display: none; }
ngbs-dropdown {
ngbs-select {
display: block; }
ngbs-dropdown .dropdown-menu-inner {
ngbs-select .dropdown-menu-inner {
max-height: 18rem;
overflow-y: auto;
overflow-x: hidden; }
ngbs-dropdown .selected {
ngbs-select .selected {
font-weight: bold; }
ngbs-tabs .tab-pane {
display: none; }
Expand Down Expand Up @@ -151,8 +151,9 @@ pre[class*="language-"] {
cursor: help;
}

pre[prism], code[prism] {
white-space: pre-wrap; }
pre[class*="language-"], code[prism] {
white-space: pre-wrap;
margin: 0; }
@media (max-width: 767px) {
demo .live-example {
border-bottom: 1px solid silver;
Expand Down
Loading

0 comments on commit 66286bf

Please sign in to comment.