Skip to content

Commit

Permalink
v2.1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
zack9433 committed Sep 30, 2016
2 parents 3bf36cd + badc7c8 commit dcb9466
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 98 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ branches:
- master
before_install:
- npm i -g npm@^3.0.0
- npm cache clean
- rm -rf node_modules
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
Expand Down
2 changes: 1 addition & 1 deletion app/sanji-window/sanji-window-loading.tpl.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script type ="text/ng-template" id="sanji-window-loading.tpl.html">
<div class="sj-window-loading" layout layout-align="space-around">
<md-progress-circular class="sj-spinner-bg md-whiteframe-1dp"
<md-progress-circular class="sj-spinner-bg md-whiteframe-2dp"
md-diameter="35px" md-mode="indeterminate"></md-progress-circular>
</div>
</script>
2 changes: 1 addition & 1 deletion app/sanji-window/sanji-window.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $card-header-color: #5e5e5e;

.sj-spinner-bg {
background-color: #fff;
padding: 5px !important;
border: 5px solid #fff;
border-radius: 50%;
}

4 changes: 2 additions & 2 deletions app/sanji-window/sanji-window.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ <h3 flex ng-bind="vm.windowName"></h3>
<div flex class="sj-window-btn-group">
<md-button ng-if="undefined!==vm.showLoadingBtn"
type="button" aria-label="Refresh" class="md-icon-button" ng-click="vm.refresh()">
<ng-md-icon icon="refresh"></ng-md-icon>
<md-icon ng-md-icon icon="refresh"></md-icon>
</md-button>
<md-menu ng-if="1 < vm.sanjiWindowMgr.links.length"
md-position-mode="target-right target">
<md-button type="button" aria-label="Open menu" class="md-icon-button"
ng-click="$mdOpenMenu($event)">
<ng-md-icon md-menu-origin icon="apps"></ng-md-icon>
<md-icon ng-md-icon md-menu-origin icon="apps"></md-icon>
</md-button>
<md-menu-content width="4">
<md-menu-item ng-repeat="state in vm.sanjiWindowMgr.links track by $index">
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-sanji-window.css

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

2 changes: 1 addition & 1 deletion dist/angular-sanji-window.js

Large diffs are not rendered by default.

56 changes: 10 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,60 +12,24 @@
}
},
"scripts": {
"test": "NODE_ENV=test BABEL_ENV=test karma start",
"test:once": "BABEL_ENV=test karma start",
"prebuild": "rm -rf dist && mkdir dist",
"build": "NODE_ENV=production webpack --config webpack.build.js --display-modules",
"test": "cross-env NODE_ENV=test BABEL_ENV=test karma start",
"test:once": "cross-env BABEL_ENV=test karma start",
"prebuild": "rimraf dist && mkdir dist",
"build": "cross-env NODE_ENV=production webpack --config webpack.build.js --display-modules",
"commit": "git-cz",
"check-coverage": "istanbul check-coverage --statements 90 --branches 90 --functions 90 --lines 90",
"report-coverage": "cat ./coverage/lcov.info | codecov",
"start": "NODE_ENV=development node server/dev-server.js",
"start": "cross-env NODE_ENV=development node server/dev-server.js",
"publish-latest": "publish-latest",
"semantic-release": "semantic-release pre && npm publish && npm run publish-latest && semantic-release post"
},
"devDependencies": {
"angular-mocks": "~1.5.0",
"autoprefixer": "^6.4.0",
"babel-core": "^6.0.0",
"babel-eslint": "^6.0.4",
"babel-loader": "^6.0.0",
"babel-plugin-__coverage__": "^11.0.0",
"babel-plugin-lodash": "^3.2.4",
"babel-preset-es2015": "^6.9.0",
"codecov.io": "~0.1.6",
"commitizen": "^2.8.0",
"css-loader": "^0.24.0",
"cz-conventional-changelog": "^1.1.5",
"eslint": "^3.3.0",
"eslint-loader": "^1.3.0",
"extract-text-webpack-plugin": "^2.0.0-beta.3",
"file-loader": "~0.9.0",
"ghooks": "^1.2.0",
"html-webpack-plugin": "~2.22.0",
"karma": "~1.2.0",
"karma-chai-plugins": "~0.7.0",
"karma-chrome-launcher": "~2.0.0",
"karma-coverage": "~1.1.0",
"karma-mocha": "~1.1.1",
"karma-sourcemap-loader": "~0.3.7",
"karma-spec-reporter": "0.0.26",
"karma-webpack": "~1.8.0",
"lodash-webpack-plugin": "^0.10.0",
"mocha": "^3.0.0",
"ng-annotate-loader": "~0.1.0",
"ng-cache-loader": "~0.0.15",
"node-bourbon": "~4.2.3",
"node-sass": "^3.8.0",
"postcss-loader": "^0.11.0",
"progress-bar-webpack-plugin": "^1.9.0",
"publish-latest": "~1.1.2",
"raw-loader": "~0.5.1",
"sass-loader": "~4.0.0",
"semantic-release": "^4.3.5",
"style-loader": "~0.13.0",
"url-loader": "~0.5.7",
"webpack": "^2.1.0-beta.20",
"webpack-dev-server": "^2.1.0-beta.0"
"sanji-common-devs-ui": "~1.0.2",
"semantic-release": "^4.3.5"
},
"repository": {
"type": "git",
Expand All @@ -83,11 +47,11 @@
"homepage": "https://github.com/Sanji-IO/angular-sanji-window",
"dependencies": {
"angular": "~1.5.0",
"angular-animate": "~1.5.8",
"angular-aria": "~1.5.8",
"angular-animate": "~1.5.0",
"angular-aria": "~1.5.0",
"angular-busy": "~4.1.3",
"angular-material": "~1.1.0",
"angular-material-icons": "^0.7.1"
},
"version": "2.1.10"
"version": "2.1.11"
}
15 changes: 6 additions & 9 deletions server/dev-server.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
'use strict';

var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('../webpack.dev');
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const config = require('../webpack.dev');
new WebpackDevServer(webpack(config), {
hot: true,
historyApiFallback: true,
stats: {
colors: true,
colors: true
}
})
.listen(config.port, config.ip, function(err) {
.listen(8080, 'localhost', function(err) {
if (err) {
throw err;
}
console.log('Listening at ' + config.ip + ':' + config.port);
console.log('Listening at localhost:8080');
});

19 changes: 9 additions & 10 deletions webpack.build.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

const webpack = require('webpack');
const LodashModuleReplacementPlugin = require('lodash-webpack-plugin');
const autoprefixer = require('autoprefixer');
Expand Down Expand Up @@ -40,20 +38,16 @@ config.externals = {
}
};

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

config.module.postLoaders = [
{test: /\.js$/, loader: 'ng-annotate', exclude: /(node_modules)/}
];
config.postcss = [ autoprefixer({ browsers: ['last 2 versions'] }) ];
].concat(config.module.rules);

config.plugins.push(
new ExtractTextPlugin('angular-sanji-window.css'),
Expand All @@ -62,7 +56,12 @@ config.plugins.push(
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false,
quiet: true
quiet: true,
options:{
postcss: [
autoprefixer({ browsers: ['last 2 versions'] })
]
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
Expand Down
19 changes: 5 additions & 14 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

const path = require('path');
const webpack = require('webpack');
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
Expand All @@ -13,34 +11,27 @@ const config = {
filename: 'angular-sanji-window.js'
},
resolve: {
root: [nodeRoot],
// npm-linked packages can locate missing dependencies in app's node_modules
fallback: nodeRoot,
alias: {
'angular-material.css': nodeRoot + '/angular-material/angular-material.css',
'angular-material-icons.css': nodeRoot + '/angular-material-icons/angular-material-icons.css',
'angular-busy.css': nodeRoot + '/angular-busy/angular-busy.css'
},
extensions: ['', '.js', '.json', 'html', 'scss', 'css']
extensions: ['.js', '.json', 'html', 'scss', 'css']
},
module: {
preLoaders: [
{test: /\.js$/, loader: "eslint", exclude: /(node_modules)/}
],
loaders: [
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')] }
],
noParse: []
]
},
plugins: [
new ProgressBarPlugin(),
new webpack.DefinePlugin({
__TEST__: 'test' === NODE_ENV,
__DEV__: 'development' === NODE_ENV,
__RELEASE__: 'production' === NODE_ENV
}),
new webpack.NoErrorsPlugin()
})
]
};

Expand Down
25 changes: 12 additions & 13 deletions webpack.dev.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
'use strict';

const webpack = require('webpack');
const autoprefixer = require('autoprefixer');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const bourbon = require('node-bourbon').includePaths;
const config = require('./webpack.config.js');

config.ip = 'localhost';
config.port = 8080;
config.debug = true;
config.devtool = 'eval';
config.entry = {
'angular-module': [
'webpack/hot/dev-server',
'webpack-dev-server/client?http://' + config.ip + ':' + config.port,
'webpack-dev-server/client?http://localhost:8080',
'./app.js'
]
};
config.module.loaders = [
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/}
].concat(config.module.loaders);

config.module.postLoaders = [
{test: /\.js$/, loader: 'ng-annotate', exclude: /(node_modules)/}
];
config.postcss = [ autoprefixer({ browsers: ['last 2 versions'] }) ];
].concat(config.module.rules);

config.plugins.push(
new webpack.HotModuleReplacementPlugin(),
new webpack.LoaderOptionsPlugin({
debug: true,
options: {
postcss: [
autoprefixer({ browsers: ['last 2 versions'] })
]
}
}),
new HtmlWebpackPlugin({
template: 'index.html',
hash: true
Expand Down

0 comments on commit dcb9466

Please sign in to comment.