* webpack poc, this is not going to work for plugins, dam

* tech: webpack and systemjs for plugins starting to work

* tech: webpack and systemjs combo starting to work

* tech: webpack + karma tests progress

* tech: webpack + karma progress

* tech: working on tests

* tech: webpack

* tech: webpack + karma, all tests pass

* tech: webpack + karma, all tests pass

* tech: webpack all tests pass

* webpack: getting closer

* tech: webpack progress

* webpack: further build refinements

* webpack: ng annotate fixes

* webpack: optimized build fix

* tech: minor fix for elasticsearch

* tech: webpack + ace editor

* tech: restored lodash move mixin compatability

* tech: added enzyme react test and upgraded to react v16

* tech: package version fix

* tech: added testdata to built in bundle

* webpack: sass progress

* tech: prod & dev build is working for the sass

* tech: clean up unused grunt stuff and moved to scripts folder

* tech: added vendor and manifest chunks, updated readme and docs

* tech: webpack finishing touches
This commit is contained in:
Torkel Ödegaard
2017-10-01 20:02:25 +02:00
committed by GitHub
parent f6cc741a6d
commit 0c86241c5b
139 changed files with 6186 additions and 15146 deletions

View File

@@ -0,0 +1,11 @@
module.exports = function(config) {
'use strict';
return {
release: ['<%= destDir %>', '<%= tempDir %>', '<%= genDir %>'],
build: ['<%= srcDir %>/build'],
temp: ['<%= tempDir %>'],
packaging: [
],
};
};

View File

@@ -0,0 +1,30 @@
module.exports = function(config) {
'use strict';
var task = {
release: {
options: {
archive: '<%= destDir %>/<%= pkg.name %>-<%= pkg.version %>.<%= platform %>-<%= arch %>.tar.gz'
},
files : [
{
expand: true,
cwd: '<%= tempDir %>',
src: ['**/*'],
dest: '<%= pkg.name %>-<%= pkg.version %>/',
},
{
expand: true,
src: ['LICENSE.md', 'README.md', 'NOTICE.md'],
dest: '<%= pkg.name %>-<%= pkg.version %>/',
}
]
}
};
if (config.platform === 'windows') {
task.release.options.archive = '<%= destDir %>/<%= pkg.name %>-<%= pkg.version %>.<%= platform %>-<%= arch %>.zip';
}
return task;
};

View File

@@ -0,0 +1,6 @@
module.exports = function(config, grunt) {
'use strict'
return {
tslint : "node ./node_modules/tslint/lib/tslint-cli.js -c tslint.json --project ./tsconfig.json --type-check",
};
};

View File

@@ -0,0 +1,22 @@
module.exports = function(config) {
return {
src: [
'Gruntfile.js',
'<%= srcDir %>/app/**/*.js',
'<%= srcDir %>/plugin/**/*.js',
'!<%= srcDir %>/app/dashboards/*'
],
options: {
config: ".jscs.json",
},
};
};
/*
"requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowRightStickedOperators": ["?", "+", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"requireRightStickedOperators": ["!"],
"requireLeftStickedOperators": [","],
*/

View File

@@ -0,0 +1,20 @@
module.exports = function(config) {
return {
source: {
files: {
src: ['Gruntfile.js', '<%= srcDir %>/app/**/*.js'],
}
},
options: {
jshintrc: true,
reporter: require('jshint-stylish'),
ignores: [
'node_modules/*',
'dist/*',
'sample/*',
'<%= srcDir %>/vendor/*',
'<%= srcDir %>/app/dashboards/*'
]
}
};
};

View File

@@ -0,0 +1,20 @@
module.exports = function(config) {
'use strict';
return {
dev: {
configFile: 'karma.conf.js',
singleRun: false,
},
debug: {
configFile: 'karma.conf.js',
singleRun: false,
browsers: ['Chrome']
},
test: {
configFile: 'karma.conf.js',
}
};
};

View File

@@ -0,0 +1,37 @@
module.exports = function(config,grunt) {
'use strict';
grunt.registerTask('phantomjs', 'Copy phantomjs binary to vendor/', function() {
var dest = './vendor/phantomjs/phantomjs';
var confDir = './node_modules/phantomjs-prebuilt/lib/';
if (process.platform === "win32") {
dest += ".exe";
}
src = config.phjs
if (!src){
var m=grunt.file.read(confDir+"location.js")
var src=/= \"([^\"]*)\"/.exec(m)[1];
if (!grunt.file.isPathAbsolute(src)) {
src = confDir+src;
}
}
try {
grunt.config('copy.phantom_bin', {
src: src,
dest: dest,
options: { mode: true},
});
grunt.task.run('copy:phantom_bin');
} catch (err) {
grunt.verbose.writeln(err);
grunt.fail.warn('No working Phantomjs binary available')
}
});
};

View File

@@ -0,0 +1,12 @@
module.exports = function(config) {
'use strict';
return {
options: {
configFile: 'public/sass/.sass-lint.yml',
},
target: [
'public/sass/*.scss',
'public/sass/components/*.scss',
]
};
};

View File

@@ -0,0 +1,11 @@
module.exports = function(config, grunt) {
'use strict'
// dummy to avoid template compile error
return {
source: {
files: {
src: ""
}
}
};
};

View File

@@ -0,0 +1,13 @@
const dev = require('../../webpack/webpack.dev.js');
const prod = require('../../webpack/webpack.prod.js');
module.exports = function() {
'use strict';
return {
options: {
stats: !process.env.NODE_ENV || process.env.NODE_ENV === 'development'
},
dev: dev,
prod: prod
};
};