-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #320 from Robert-Frampton/release/v2.15.0
release/v2.15.0
- Loading branch information
Showing
161 changed files
with
8,506 additions
and
12,140 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
packages/metal-soy-bundle/src/**/*.js | ||
*.soy.js | ||
packages/metal-isomorphic/**/*.js | ||
packages/metal-soy-bundle/**/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"node": true | ||
}, | ||
"extends": "liferay" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,7 @@ addons: | |
secure: rV35O/fLO1NHiINBspiMzvWWtJPBdetUb3bB4mBB2Qrqf0WMRMGJ4Pgkaxl0p9JqAgPMQ/HSQTKLPNKaATc5g6GO46H7N1ykWBLrhsi7YSgopbNwUw95RebaZc42iyfgbnYG1hU8YEmes01UwXLsVup6qNt7X64I+M/KcfM6Cb8= | ||
|
||
before_install: | ||
- nvm install 7 | ||
- npm install -g gulp | ||
- nvm install 8 | ||
- npm install -g [email protected] | ||
|
||
install: | ||
|
@@ -19,5 +18,7 @@ jdk: | |
language: java | ||
|
||
script: | ||
- gulp test:saucelabs | ||
- npm run checkFormat | ||
- npm run lint | ||
- npm run test:saucelabs | ||
- npm run test:isomorphic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,160 +1,21 @@ | ||
'use strict'; | ||
|
||
var babel = require('gulp-babel'); | ||
var compileSoy = require('metal-tools-soy/lib/pipelines/compileSoy'); | ||
var gulp = require('gulp'); | ||
var karma = require('karma'); | ||
var metal = require('gulp-metal'); | ||
var path = require('path'); | ||
var replace = require('gulp-replace'); | ||
|
||
var codeGlobs = [ | ||
'packages/metal*/src/**/*.js', | ||
'packages/metal*/test/**/*.js', | ||
'!packages/metal*/**/*.soy.js', | ||
'!packages/metal-incremental-dom/**/incremental-dom.js', | ||
'gulpfile.js', | ||
'karma.conf.js', | ||
'karma-coverage.conf.js' | ||
]; | ||
|
||
metal.registerTasks({ | ||
bundleFileName: 'metal.js', | ||
formatGlobs: codeGlobs, | ||
karma: require('karma'), | ||
lintGlobs: codeGlobs, | ||
testDepTasks: ['build:cjs'], | ||
testNodeSrc: [ | ||
// Since all files will be added, we need to ensure manually that these | ||
// will be added first. | ||
'packages/metal-incremental-dom/lib/incremental-dom.js', | ||
|
||
// Test files | ||
'env/test/node.js', | ||
'packages/metal/test/**/*.js', | ||
'packages/metal-component/test/**/*.js', | ||
'packages/metal-dom/test/**/*.js', | ||
'packages/metal-events/test/**/*.js', | ||
'packages/metal-incremental-dom/test/**/*.js', | ||
'packages/metal-jsx/test/**/*.js', | ||
'packages/metal-soy/test/**/*.js', | ||
'packages/metal-state/test/**/*.js' | ||
], | ||
testSaucelabsBrowsers: { | ||
sl_chrome: { | ||
base: 'SauceLabs', | ||
browserName: 'chrome' | ||
}, | ||
sl_safari_8: { | ||
base: 'SauceLabs', | ||
browserName: 'safari', | ||
platform: 'OS X 10.10' | ||
}, | ||
sl_safari_10: { | ||
base: 'SauceLabs', | ||
browserName: 'safari', | ||
platform: 'OS X 10.12', | ||
version: '10' | ||
}, | ||
sl_firefox: { | ||
base: 'SauceLabs', | ||
browserName: 'firefox' | ||
}, | ||
sl_ie_9: { | ||
base: 'SauceLabs', | ||
browserName: 'internet explorer', | ||
platform: 'Windows 7', | ||
version: '9' | ||
}, | ||
sl_ie_10: { | ||
base: 'SauceLabs', | ||
browserName: 'internet explorer', | ||
platform: 'Windows 7', | ||
version: '10' | ||
}, | ||
sl_ie_11: { | ||
base: 'SauceLabs', | ||
browserName: 'internet explorer', | ||
platform: 'Windows 8.1', | ||
version: '11' | ||
}, | ||
sl_edge_15: { | ||
base: 'SauceLabs', | ||
browserName: 'microsoftedge', | ||
platform: 'Windows 10', | ||
version: '15' | ||
}, | ||
sl_android_4: { | ||
base: 'SauceLabs', | ||
browserName: 'android', | ||
platform: 'Linux', | ||
version: '4.4' | ||
}, | ||
sl_android_5: { | ||
base: 'SauceLabs', | ||
browserName: 'android', | ||
platform: 'Linux', | ||
version: '5.0' | ||
} | ||
}, | ||
useEslint: true | ||
}); | ||
let compileSoy = require('metal-tools-soy/lib/pipelines/compileSoy'); | ||
let gulp = require('gulp'); | ||
let replace = require('gulp-replace'); | ||
|
||
gulp.task('soy', function() { | ||
return gulp.src('packages/metal-soy/test/**/*.soy') | ||
return gulp | ||
.src('packages/metal-soy/test/**/*.soy') | ||
.pipe(compileSoy()) | ||
.pipe(replace('metal-soy', '../..')) | ||
.pipe(replace('metal-component/src/Component', 'metal-component')) | ||
.pipe(gulp.dest('packages/metal-soy/test')); | ||
}); | ||
|
||
gulp.task('soy:isomorphic', function() { | ||
return gulp.src('packages/metal-isomorphic/test/**/*.soy') | ||
return gulp | ||
.src('packages/metal-isomorphic/test/**/*.soy') | ||
.pipe(compileSoy()) | ||
.pipe(gulp.dest('packages/metal-isomorphic/test')); | ||
}); | ||
|
||
gulp.task('build:cjs', ['soy'], function() { | ||
return compileToLib('packages/metal*/src/**/*.js'); | ||
}); | ||
|
||
var changedJsSrc; | ||
gulp.task('compile', function() { | ||
return compileToLib(changedJsSrc); | ||
}); | ||
|
||
// We need to override gulp-metal's default test:watch task so that it will | ||
// update lib files when the related src files change. | ||
gulp.task('test:watch', ['build:cjs'], function(done) { // eslint-disable-line | ||
gulp.watch('packages/metal-soy/test/**/*.soy', ['soy']); | ||
var jsWatcher = gulp.watch('packages/metal*/src/**/*.js', ['compile']); | ||
jsWatcher.on('change', function(event) { | ||
changedJsSrc = event.path; | ||
}); | ||
|
||
new karma.Server( | ||
{ | ||
configFile: path.resolve('karma.conf.js') | ||
} | ||
).start(); | ||
}); | ||
|
||
function calcDestDir(file) { | ||
var relative = path.relative(path.resolve('packages'), file.path); | ||
var index = relative.indexOf(path.sep); | ||
file.base = path.dirname(file.path); | ||
return path.dirname(path.join( | ||
path.resolve('packages'), | ||
relative.substr(0, index), | ||
'lib', | ||
relative.substr(index + 5) | ||
)); | ||
} | ||
|
||
function compileToLib(src) { | ||
return gulp.src(src) | ||
.pipe(babel({ | ||
presets: ['env'] | ||
})) | ||
.pipe(gulp.dest(calcDestDir)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,115 +1,42 @@ | ||
'use strict'; | ||
|
||
var lernaJson = require('./lerna.json'); | ||
const karmaConfig = require('./karma.conf.js'); | ||
const lernaJson = require('./lerna.json'); | ||
|
||
module.exports = function(config) { | ||
config.set({ | ||
frameworks: ['browserify', 'mocha', 'chai', 'sinon', 'source-map-support'], | ||
|
||
files: [ | ||
// Since all files will be added, we need to ensure manually that these | ||
// will be added first. | ||
{ | ||
pattern: 'packages/metal-incremental-dom/src/incremental-dom.js', | ||
watched: false, | ||
included: true, | ||
served: true | ||
}, | ||
{ | ||
pattern: 'packages/metal-incremental-dom/lib/incremental-dom.js', | ||
watched: false, | ||
included: true, | ||
served: true | ||
}, | ||
{ | ||
pattern: 'packages/metal-soy-bundle/lib/bundle.js', | ||
watched: false, | ||
included: true, | ||
served: true | ||
}, | ||
{ | ||
pattern: 'packages/metal-web-component/node_modules/babel-polyfill/dist/polyfill.min.js', | ||
watched: false, | ||
included: true, | ||
served: true | ||
}, | ||
{ | ||
pattern: 'packages/metal-web-component/node_modules/@webcomponents/webcomponentsjs/webcomponents-lite.js', | ||
watched: false, | ||
included: false, | ||
served: true | ||
}, | ||
{ | ||
pattern: 'packages/metal-web-component/webcomponents_polyfill.js', | ||
watched: false, | ||
included: true, | ||
served: true | ||
}, | ||
{ | ||
pattern: 'packages/metal*/test/**/*.js', | ||
watched: false, | ||
included: true, | ||
served: true | ||
}, | ||
{ | ||
pattern: 'packages/metal-dom/fixtures/*', | ||
watched: true, | ||
included: false, | ||
served: true | ||
} | ||
], | ||
|
||
exclude: ['packages/metal-isomorphic/**/*.js'], | ||
karmaConfig(config); | ||
|
||
preprocessors: { | ||
'packages/metal-incremental-dom/src/incremental-dom.js': ['browserify'], | ||
'packages/metal-incremental-dom/lib/incremental-dom.js': ['browserify'], | ||
'packages/metal-soy-bundle/lib/bundle.js': ['browserify'], | ||
'packages/metal*/test/**/*.js': ['browserify'] | ||
}, | ||
|
||
browsers: ['Chrome'], | ||
config.plugins.push('karma-coverage'); | ||
|
||
config.set({ | ||
browserify: { | ||
debug: true, | ||
transform: [ | ||
[ | ||
'babelify', | ||
{ | ||
plugins: [ | ||
'istanbul' | ||
], | ||
presets: [ | ||
'env' | ||
] | ||
} | ||
] | ||
plugins: ['istanbul'], | ||
presets: ['env'], | ||
}, | ||
], | ||
], | ||
insertGlobalVars: { | ||
METAL_VERSION: function() { | ||
return '\'' + lernaJson.version + '\''; | ||
} | ||
} | ||
}, | ||
}, | ||
}, | ||
|
||
reporters: ['coverage', 'progress'], | ||
|
||
coverageReporter: { | ||
reporters: [ | ||
{ | ||
type: 'lcov', | ||
subdir: 'lcov' | ||
subdir: 'lcov', | ||
}, | ||
{ | ||
type: 'text-summary' | ||
} | ||
] | ||
type: 'text-summary', | ||
}, | ||
], | ||
}, | ||
|
||
autoWatch: true, | ||
|
||
proxies: { | ||
'/fixtures/': '/base/packages/metal-dom/fixtures/' | ||
} | ||
reporters: ['coverage', 'progress'], | ||
}); | ||
}; |
Oops, something went wrong.