Skip to content

Commit

Permalink
v1.3.14
Browse files Browse the repository at this point in the history
  • Loading branch information
zack9433 committed Dec 19, 2016
2 parents c9e1e10 + 515cec7 commit 0405a6c
Show file tree
Hide file tree
Showing 18 changed files with 91 additions and 45 deletions.
33 changes: 24 additions & 9 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,34 @@
},
"globals": {
"angular": true,
"FileSaver": true,
"sinon": true,
"expect": true,
"__DEV__": true,
"__TEST__": true,
"__RELEASE__": true,
"__BASE_PATH__": true
},
"rules": {
"indent": [ 2, 2 ],
"quotes": [ 2, "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
"linebreak-style": [ 2, "unix" ],
"semi": [ 2, "always" ],
"indent": [
"error",
2,
{
"SwitchCase": 1
}
],
"quotes": [
2,
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"linebreak-style": [
2,
"unix"
],
"semi": [
2,
"always"
],
"no-console": 0
}
}
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cache:
notifications:
email: false
node_js:
- '4'
- '6'
branches:
only:
- master
Expand Down
2 changes: 1 addition & 1 deletion dist/sanji-rest-ui.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 5 additions & 8 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Karma configuration
'use strict';

var webpackConfig = require('./webpack.test');
var test = process.env.NODE_ENV === 'test';
var IS_TRAVIS = process.env.TRAVIS;
const webpackConfig = require('./webpack.test');
const test = process.env.NODE_ENV === 'test';
const IS_TRAVIS = process.env.TRAVIconst

module.exports = function(config) {
config.set({
Expand Down Expand Up @@ -44,15 +41,15 @@ module.exports = function(config) {
// list of files / patterns to load in the browser
files: [
'node_modules/jquery/dist/jquery.js',
'app/app.test.js'
'src/app.test.js'
],


// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
// run the bundle through the webpack and sourcemap plugins
preprocessors: {
'app/app.test.js': [ 'webpack', 'sourcemap' ]
'src/app.test.js': [ 'webpack', 'sourcemap' ]
},


Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "sanji-rest-ui",
"author": "Zack Yang <[email protected]> (https://github.com/zack9433)",
"description": "sanji-rest-ui UI",
"version": "1.3.13",
"version": "1.3.14",
"main": "dist/sanji-rest-ui.js",
"config": {
"ghooks": {
Expand Down Expand Up @@ -31,11 +31,11 @@
"angular-material": "~1.1.0",
"angular-material-icons": "~0.7.0",
"angular-mocks": "~1.5.0",
"angular-sanji-window": "~2.1.0",
"angular-sanji-window": "~2.1.12",
"codecov.io": "^0.1.6",
"publish-latest": "~1.1.2",
"sanji-common-devs-ui": "~1.0.2",
"semantic-release": "^4.3.5",
"sanji-common-devs-ui": "~1.0.4",
"semantic-release": "^6.3.2",
"svg-morpheus": "alexk111/SVG-Morpheus#v0.1.8",
"toastr": "~2.1.2"
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions webpack.build.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,18 @@ config.externals = {
};

config.module.rules = [
{test: /\.js$/, loader: 'ng-annotate', exclude: /(node_modules)/, enforce: 'post'},
{test: /\.js$/, use: 'ng-annotate-loader', exclude: /(node_modules)/, enforce: 'post'},
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract({
notExtractLoader: 'style-loader',
loader: 'css!postcss!sass?includePaths[]=' + bourbon
loader: 'css-loader!postcss-loader!sass-loader?includePaths[]=' + bourbon
})
}
].concat(config.module.rules);

config.plugins.push(
new ExtractTextPlugin('sanji-rest-ui.css'),
new webpack.optimize.DedupePlugin(),
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false,
Expand Down
14 changes: 7 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const ProgressBarPlugin = require('progress-bar-webpack-plugin');
const LodashModuleReplacementPlugin = require('lodash-webpack-plugin');
const NODE_ENV = process.env.NODE_ENV;
const nodeRoot = path.join(__dirname, 'node_modules');
const appRoot = path.join(__dirname, 'app');
const appRoot = path.join(__dirname, 'src');
const config = {
context: appRoot,
output: {
Expand All @@ -23,18 +23,18 @@ const config = {
},
module: {
rules: [
{ test: /\.js$/, loader: 'eslint', exclude: /node_modules/, enforce: 'pre' },
{test: /\.js$/, loader: 'babel?cacheDirectory', exclude: /(node_modules)/},
{ test: /\.html$/, loader: 'ng-cache?prefix=[dir]/[dir]', exclude: [/node_modules/, path.join(__dirname, '/app/index.html')] }
{ test: /\.js$/, use: 'eslint-loader', exclude: /node_modules/, enforce: 'pre' },
{test: /\.js$/, use: 'babel-loader?cacheDirectory', exclude: /(node_modules)/},
{ test: /\.html$/, use: 'ng-cache-loader?prefix=[dir]/[dir]', exclude: [/node_modules/, path.join(__dirname, '/src/index.html')] }
]
},
plugins: [
new ProgressBarPlugin(),
new LodashModuleReplacementPlugin,
new webpack.DefinePlugin({
__TEST__: 'test' === NODE_ENV,
__DEV__: 'development' === NODE_ENV,
__RELEASE__: 'production' === NODE_ENV
'proces.env': {
'NODE_ENV': JSON.stringify(NODE_ENV || 'development')
}
})
]
};
Expand Down
33 changes: 26 additions & 7 deletions webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
const bourbon = require('node-bourbon').includePaths;
const config = require('./webpack.config.js');

config.devtool = 'eval';
config.devtool = 'cheap-module-eval-source-map';
config.performance = {
hints: false
};
config.entry = {
'sanji-ui': [
'webpack/hot/dev-server',
Expand All @@ -13,12 +16,28 @@ config.entry = {
]
};
config.module.rules = [
{test: /\.js$/, loader: 'ng-annotate', exclude: /(node_modules)/, enforce: 'post'},
{test: /\.scss/, loader: 'style!css!postcss!sass?includePaths[]=' + bourbon},
{test: /\.css$/, loader: 'style!css!postcss?browsers=last 2 versions'},
{test: /\.(png|jpg|gif|jpeg)$/, loader: 'url-loader?limit=8192', exclude: /node_modules/},
{test: /\.(woff|woff2)$/, loader: 'url?limit=10000&minetype=application/font-woff', exclude: /node_modules/},
{test: /\.(ttf|eot|svg)$/, loader: 'file', exclude: /node_modules/}
{test: /\.js$/, use: 'ng-annotate-loader', exclude: /(node_modules)/, enforce: 'post'},
{
test: /\.scss/,
use: ['style-loader', 'css-loader', 'postcss-loader', {
loader: 'sass-loader',
options: {
includePaths: bourbon
}
}]
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader', {
loader: 'postcss-loader',
options: {
browsers: 'last 2 versions'
}
}]
},
{test: /\.(png|jpg|gif|jpeg)$/, use: 'url-loader?limit=8192', exclude: /node_modules/},
{test: /\.(woff|woff2)$/, use: 'url-loader?limit=10000&minetype=application/font-woff', exclude: /node_modules/},
{test: /\.(ttf|eot|svg)$/, use: 'file-loader', exclude: /node_modules/}
].concat(config.module.rules);

config.plugins.push(
Expand Down
26 changes: 21 additions & 5 deletions webpack.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,27 @@ config.entry = {};
config.output = {};

config.module.rules = [
{test: /\.scss/, loader: 'style!css!postcss!sass?includePaths[]=' + bourbon},
{test: /\.css$/, loader: 'style!css!postcss'},
{test: /\.(png|jpg|gif|jpeg)$/, loader: 'url-loader?limit=8192'},
{test: /\.(woff|woff2)$/, loader: 'url?limit=10000&minetype=application/font-woff'},
{test: /\.(ttf|eot|svg)$/, loader: 'file'}
{
test: /\.scss/,
use: ['style-loader', 'css-loader', 'postcss-loader', {
loader: 'sass-loader',
options: {
includePaths: bourbon
}
}]
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader', {
loader: 'postcss-loader',
options: {
browsers: 'last 2 versions'
}
}]
},
{test: /\.(png|jpg|gif|jpeg)$/, use: 'url-loader?limit=8192'},
{test: /\.(woff|woff2)$/, use: 'url-loader?limit=10000&minetype=application/font-woff'},
{test: /\.(ttf|eot|svg)$/, use: 'file-loader'}
].concat(config.module.rules);

config.plugins.push(
Expand Down

0 comments on commit 0405a6c

Please sign in to comment.