Skip to content
This repository has been archived by the owner on Oct 5, 2020. It is now read-only.

Utilizing ES6, webpack and babel with angular 1.5 #371

Open
wants to merge 3 commits into
base: es6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/templates/_babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"plugins": ["transform-runtime"],
"presets": ["es2015", "stage-0"]
}
3 changes: 2 additions & 1 deletion app/templates/_jshintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"browser": true,
"camelcase": true,
"esversion": 6,
"curly": true,
"devel": true,
"eqeqeq": true,
Expand All @@ -11,7 +12,7 @@
"quotmark": "single",
"undef": true,
"unused": "vars",
"strict": true,
"strict": "implied",
"trailing": true,
"globals": {
"angular": false,
Expand Down
47 changes: 3 additions & 44 deletions app/templates/bower.json
Original file line number Diff line number Diff line change
@@ -1,48 +1,7 @@
{
"name": "@sample-app-name",
"version": "0.0.0",
"dependencies": {
"jquery": "~2.1.4",
"angular": "~1.4.4",
"angular-animate": "~1.4.4",
"angular-bootstrap": "^1.1",
"angular-bootstrap-confirm": "^2.3.0",
"angular-cookies": "~1.4.4",
"angular-google-maps": "2.3.2",
"angular-highlightjs": "~0.4.3",
"angular-messages": "~1.4.4",
"angular-mocks": "~1.4.4",
"angular-sanitize": "~1.4.4",
"angular-ui-router": "~0.2.15",
"angular-ui-tinymce": "~0.0.9",
"angular-x2js": "https://github.com/janmichaelyu/angular-x2js.git",
"bootstrap": "~3.3.5",
"font-awesome": "~4.6.0",
"highcharts": "^4.2",
"highlightjs":"~8.7.0",
"ng-json-explorer": "8c2a0f9104",
"ngtoast": "^2.0.0",
"lodash": "~3.10.1",
"ml-search-ng": "~0.2.0",
"ml-utils": "withjam/ml-utils",
"tinymce-dist": "4.3.12",
"vkbeautify-wrapper": "*"
},
"overrides": {
"angular-highlightjs": {
"dependencies": {
"angular" : ">1.0.8",
"highlightjs":"~8.7.0"
}
}
},
"devDependencies": {
"angular-mocks": "~1.4.4",
"bardjs": "~0.1.8",
"sinon": "http://sinonjs.org/releases/sinon-1.16.1.js"
},
"private": true,
"resolutions": {
"angular": "~1.4.4"
}
"dependencies": {},
"overrides": {},
"devDependencies": {}
}
24 changes: 18 additions & 6 deletions app/templates/gulp.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,24 @@ module.exports = function() {
var temp = './.tmp/';
var _ = require('lodash');
var wiredep = require('wiredep');

var bower = {
json: require('./bower.json'),
directory: './bower_components/',
ignorePath: '..'
};

var getWiredepDefaultOptions = function() {
return {
bowerJson: bower.json,
directory: bower.directory,
ignorePath: bower.ignorePath,
exclude: [ 'requirejs', 'angularjs', 'font-awesome.css' ]
exclude: ['requirejs', 'angularjs', 'font-awesome.css']
};
};
var bowerFiles = wiredep(_.merge(getWiredepDefaultOptions(), { devDependencies: true })).js;
var bowerFiles = wiredep(_.merge(getWiredepDefaultOptions(), {
devDependencies: true
})).js;
var nodeModules = 'node_modules';

var config = {
Expand Down Expand Up @@ -94,7 +98,9 @@ module.exports = function() {
/**
* plato
*/
plato: {js: clientApp + '**/*.js'},
plato: {
js: clientApp + '**/*.js'
},

/**
* browser sync
Expand Down Expand Up @@ -183,9 +189,15 @@ module.exports = function() {
// dir: report + 'coverage',
reporters: [
// reporters not supporting the `file` property
{type: 'html', subdir: 'report-html'},
{type: 'lcov', subdir: 'report-lcov'},
{type: 'text-summary'} //, subdir: '.', file: 'text-summary.txt'}
{
type: 'html',
subdir: 'report-html'
}, {
type: 'lcov',
subdir: 'report-lcov'
}, {
type: 'text-summary'
} //, subdir: '.', file: 'text-summary.txt'}
]
},
preprocessors: {}
Expand Down
Loading