Skip to content

Commit 3906764

Browse files
chore(all): initial repository setup
1 parent 92d6ec0 commit 3906764

21 files changed

+344
-3
lines changed

.editorconfig

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
# 2 space indentation
12+
[**.*]
13+
indent_style = space
14+
indent_size = 2

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
jspm_packages
3+
bower_components
4+
.idea
5+
.DS_STORE
6+
*.swp

.jshintrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"esnext": true
3+
}

.npmignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
jspm_packages
2+
bower_components
3+
.idea

CONTRIBUTING.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributing
2+
3+
We'd love for you to contribute and to make this project even better than it is today! If this interests you, please begin by reading [our contributing guidelines](https://github.com/DurandalProject/about/blob/master/CONTRIBUTING.md). The contributing document will provide you with all the information you need to get started. Once you have read that, you will need to also [sign our CLA](http://goo.gl/forms/dI8QDDSyKR) before we can accept a Pull Request from you. More information on the process is included in the [contributor's guide](https://github.com/DurandalProject/about/blob/master/CONTRIBUTING.md).

LICENSE

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 aurelia
3+
Copyright (c) 2014 Durandal Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22-

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
# cli
1+
# aurelia-cli
2+
23
The command line tooling for Aurelia, used for creating projects, scaffolding, bundling and more.
4+
5+
> To keep up to date on [Aurelia](http://www.aurelia.io/), please visit and subscribe to [the official blog](http://blog.durandal.io/). If you have questions, we invite you to join us on [our Gitter Channel](https://gitter.im/aurelia/discuss).

bower.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "aurelia-cli",
3+
"version": "0.1.0",
4+
"description": "The command line tooling for Aurelia, used for creating projects, scaffolding, bundling and more.",
5+
"keywords": [
6+
"aurelia",
7+
"cli",
8+
"bundle",
9+
"scaffold"
10+
],
11+
"homepage": "http://aurelia.io",
12+
"license": "MIT",
13+
"authors": [
14+
"Rob Eisenberg <[email protected]> (http://robeisenberg.com/)"
15+
],
16+
"repository": {
17+
"type": "git",
18+
"url": "https://github.com/aurelia/cli"
19+
}
20+
}

build/args.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
var yargs = require('yargs');
2+
3+
var argv = yargs.argv,
4+
validBumpTypes = "major|minor|patch|prerelease".split("|"),
5+
bump = (argv.bump || 'patch').toLowerCase();
6+
7+
if(validBumpTypes.indexOf(bump) === -1) {
8+
throw new Error('Unrecognized bump "' + bump + '".');
9+
}
10+
11+
module.exports = {
12+
bump: bump
13+
};

build/babel-options.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = {
2+
filename: '',
3+
filenameRelative: '',
4+
blacklist: [],
5+
whitelist: [],
6+
modules: '',
7+
sourceMap: true,
8+
sourceMapName: '',
9+
sourceRoot: '',
10+
moduleRoot: '',
11+
moduleIds: false,
12+
experimental: false,
13+
format: {
14+
comments: false,
15+
compact: false,
16+
indent: {
17+
parentheses: true,
18+
adjustMultilineComment: true,
19+
style: " ",
20+
base: 0
21+
}
22+
}
23+
};

build/paths.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var path = require('path');
2+
3+
var appRoot = 'src/';
4+
5+
module.exports = {
6+
root: appRoot,
7+
source: appRoot + '**/*.js',
8+
html: appRoot + '**/*.html',
9+
style: 'styles/**/*.css',
10+
output: 'dist/',
11+
doc:'./doc',
12+
e2eSpecsSrc: 'test/e2e/src/*.js',
13+
e2eSpecsDist: 'test/e2e/dist/'
14+
};

build/tasks/build.js

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
var gulp = require('gulp');
2+
var runSequence = require('run-sequence');
3+
var to5 = require('gulp-babel');
4+
var paths = require('../paths');
5+
var compilerOptions = require('../babel-options');
6+
var assign = Object.assign || require('object.assign');
7+
8+
gulp.task('build-es6', function () {
9+
return gulp.src(paths.source)
10+
.pipe(gulp.dest(paths.output + 'es6'));
11+
});
12+
13+
gulp.task('build-commonjs', function () {
14+
return gulp.src(paths.source)
15+
.pipe(to5(assign({}, compilerOptions, {modules:'common'})))
16+
.pipe(gulp.dest(paths.output + 'commonjs'));
17+
});
18+
19+
gulp.task('build-amd', function () {
20+
return gulp.src(paths.source)
21+
.pipe(to5(assign({}, compilerOptions, {modules:'amd'})))
22+
.pipe(gulp.dest(paths.output + 'amd'));
23+
});
24+
25+
gulp.task('build-system', function () {
26+
return gulp.src(paths.source)
27+
.pipe(to5(assign({}, compilerOptions, {modules:'system'})))
28+
.pipe(gulp.dest(paths.output + 'system'));
29+
});
30+
31+
gulp.task('build', function(callback) {
32+
return runSequence(
33+
'clean',
34+
['build-es6', 'build-commonjs', 'build-amd', 'build-system'],
35+
callback
36+
);
37+
});

build/tasks/clean.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
var gulp = require('gulp');
2+
var paths = require('../paths');
3+
var del = require('del');
4+
var vinylPaths = require('vinyl-paths');
5+
6+
gulp.task('clean', function() {
7+
return gulp.src([paths.output])
8+
.pipe(vinylPaths(del));
9+
});

build/tasks/dev.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
var gulp = require('gulp');
2+
var tools = require('aurelia-tools');
3+
4+
gulp.task('update-own-deps', function(){
5+
tools.updateOwnDependenciesFromLocalRepositories();
6+
});
7+
8+
gulp.task('build-dev-env', function () {
9+
tools.buildDevEnv();
10+
});

build/tasks/doc.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var gulp = require('gulp');
2+
var tools = require('aurelia-tools');
3+
var paths = require('../paths');
4+
var yuidoc = require('gulp-yuidoc');
5+
6+
gulp.task('doc-generate', function(){
7+
return gulp.src(paths.source)
8+
.pipe(yuidoc.parser(null, 'api.json'))
9+
.pipe(gulp.dest(paths.doc));
10+
});
11+
12+
gulp.task('doc', ['doc-generate'], function(){
13+
tools.transformAPIModel(paths.doc);
14+
});

build/tasks/lint.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
var gulp = require('gulp');
2+
var paths = require('../paths');
3+
var jshint = require('gulp-jshint');
4+
var stylish = require('jshint-stylish');
5+
6+
gulp.task('lint', function() {
7+
return gulp.src(paths.source)
8+
.pipe(jshint())
9+
.pipe(jshint.reporter(stylish));
10+
});

build/tasks/prepare-release.js

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
var gulp = require('gulp');
2+
var runSequence = require('run-sequence');
3+
var paths = require('../paths');
4+
var changelog = require('conventional-changelog');
5+
var fs = require('fs');
6+
var bump = require('gulp-bump');
7+
var args = require('../args');
8+
9+
gulp.task('bump-version', function(){
10+
return gulp.src(['./package.json', './bower.json'])
11+
.pipe(bump({type:args.bump })) //major|minor|patch|prerelease
12+
.pipe(gulp.dest('./'));
13+
});
14+
15+
gulp.task('changelog', function(callback) {
16+
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
17+
18+
return changelog({
19+
repository: pkg.repository.url,
20+
version: pkg.version,
21+
file: paths.doc + '/CHANGELOG.md'
22+
}, function(err, log) {
23+
fs.writeFileSync(paths.doc + '/CHANGELOG.md', log);
24+
});
25+
});
26+
27+
gulp.task('prepare-release', function(callback){
28+
return runSequence(
29+
'build',
30+
'lint',
31+
'bump-version',
32+
'doc',
33+
'changelog',
34+
callback
35+
);
36+
});

build/tasks/test.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
var gulp = require('gulp');
2+
var karma = require('karma').server;
3+
4+
/**
5+
* Run test once and exit
6+
*/
7+
gulp.task('test', function (done) {
8+
karma.start({
9+
configFile: __dirname + '/../../karma.conf.js',
10+
singleRun: true
11+
}, function(e) {
12+
done();
13+
});
14+
});
15+
16+
/**
17+
* Watch for file changes and re-run tests on each change
18+
*/
19+
gulp.task('tdd', function (done) {
20+
karma.start({
21+
configFile: __dirname + '/../../karma.conf.js'
22+
}, function(e) {
23+
done();
24+
});
25+
});

gulpfile.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('require-dir')('build/tasks');

karma.conf.js

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
// Karma configuration
2+
// Generated on Fri Dec 05 2014 16:49:29 GMT-0500 (EST)
3+
4+
module.exports = function(config) {
5+
config.set({
6+
7+
// base path that will be used to resolve all patterns (eg. files, exclude)
8+
basePath: '',
9+
10+
11+
// frameworks to use
12+
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
13+
frameworks: ['jspm', 'jasmine'],
14+
15+
jspm: {
16+
// Edit this to your needs
17+
loadFiles: ['src/**/*.js', 'test/**/*.js']
18+
},
19+
20+
21+
// list of files / patterns to load in the browser
22+
files: [],
23+
24+
25+
// list of files to exclude
26+
exclude: [
27+
],
28+
29+
30+
// preprocess matching files before serving them to the browser
31+
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
32+
preprocessors: {
33+
'test/**/*.js': ['babel'],
34+
'src/**/*.js': ['babel']
35+
},
36+
'babelPreprocessor': {
37+
options: {
38+
sourceMap: 'inline',
39+
modules: 'system',
40+
moduleIds: false
41+
}
42+
},
43+
44+
// test results reporter to use
45+
// possible values: 'dots', 'progress'
46+
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
47+
reporters: ['progress'],
48+
49+
50+
// web server port
51+
port: 9876,
52+
53+
54+
// enable / disable colors in the output (reporters and logs)
55+
colors: true,
56+
57+
58+
// level of logging
59+
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
60+
logLevel: config.LOG_INFO,
61+
62+
63+
// enable / disable watching file and executing tests whenever any file changes
64+
autoWatch: true,
65+
66+
67+
// start these browsers
68+
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
69+
browsers: ['Chrome'],
70+
71+
72+
// Continuous Integration mode
73+
// if true, Karma captures browsers, runs the tests and exits
74+
singleRun: false
75+
});
76+
};

package.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "aurelia-cli",
3+
"version": "0.1.0",
4+
"description": "The command line tooling for Aurelia, used for creating projects, scaffolding, bundling and more.",
5+
"keywords": [
6+
"aurelia",
7+
"cli",
8+
"bundle",
9+
"scaffold"
10+
],
11+
"homepage": "http://aurelia.io",
12+
"bugs": {
13+
"url": "https://github.com/aurelia/cli/issues"
14+
},
15+
"license": "MIT",
16+
"author": "Rob Eisenberg <[email protected]> (http://robeisenberg.com/)",
17+
"main": "dist/commonjs/index.js",
18+
"repository": {
19+
"type": "git",
20+
"url": "https://github.com/aurelia/cli"
21+
}
22+
}

0 commit comments

Comments
 (0)