Skip to content

Commit

Permalink
chore(all): initial repository setup
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Mar 11, 2015
1 parent 92d6ec0 commit 3906764
Show file tree
Hide file tree
Showing 21 changed files with 344 additions and 3 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

# 2 space indentation
[**.*]
indent_style = space
indent_size = 2
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
jspm_packages
bower_components
.idea
.DS_STORE
*.swp
3 changes: 3 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"esnext": true
}
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
jspm_packages
bower_components
.idea
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Contributing

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).
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 aurelia
Copyright (c) 2014 Durandal Inc.

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

5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# cli
# aurelia-cli

The command line tooling for Aurelia, used for creating projects, scaffolding, bundling and more.

> 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).
20 changes: 20 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "aurelia-cli",
"version": "0.1.0",
"description": "The command line tooling for Aurelia, used for creating projects, scaffolding, bundling and more.",
"keywords": [
"aurelia",
"cli",
"bundle",
"scaffold"
],
"homepage": "http://aurelia.io",
"license": "MIT",
"authors": [
"Rob Eisenberg <[email protected]> (http://robeisenberg.com/)"
],
"repository": {
"type": "git",
"url": "https://github.com/aurelia/cli"
}
}
13 changes: 13 additions & 0 deletions build/args.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var yargs = require('yargs');

var argv = yargs.argv,
validBumpTypes = "major|minor|patch|prerelease".split("|"),
bump = (argv.bump || 'patch').toLowerCase();

if(validBumpTypes.indexOf(bump) === -1) {
throw new Error('Unrecognized bump "' + bump + '".');
}

module.exports = {
bump: bump
};
23 changes: 23 additions & 0 deletions build/babel-options.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
filename: '',
filenameRelative: '',
blacklist: [],
whitelist: [],
modules: '',
sourceMap: true,
sourceMapName: '',
sourceRoot: '',
moduleRoot: '',
moduleIds: false,
experimental: false,
format: {
comments: false,
compact: false,
indent: {
parentheses: true,
adjustMultilineComment: true,
style: " ",
base: 0
}
}
};
14 changes: 14 additions & 0 deletions build/paths.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var path = require('path');

var appRoot = 'src/';

module.exports = {
root: appRoot,
source: appRoot + '**/*.js',
html: appRoot + '**/*.html',
style: 'styles/**/*.css',
output: 'dist/',
doc:'./doc',
e2eSpecsSrc: 'test/e2e/src/*.js',
e2eSpecsDist: 'test/e2e/dist/'
};
37 changes: 37 additions & 0 deletions build/tasks/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
var gulp = require('gulp');
var runSequence = require('run-sequence');
var to5 = require('gulp-babel');
var paths = require('../paths');
var compilerOptions = require('../babel-options');
var assign = Object.assign || require('object.assign');

gulp.task('build-es6', function () {
return gulp.src(paths.source)
.pipe(gulp.dest(paths.output + 'es6'));
});

gulp.task('build-commonjs', function () {
return gulp.src(paths.source)
.pipe(to5(assign({}, compilerOptions, {modules:'common'})))
.pipe(gulp.dest(paths.output + 'commonjs'));
});

gulp.task('build-amd', function () {
return gulp.src(paths.source)
.pipe(to5(assign({}, compilerOptions, {modules:'amd'})))
.pipe(gulp.dest(paths.output + 'amd'));
});

gulp.task('build-system', function () {
return gulp.src(paths.source)
.pipe(to5(assign({}, compilerOptions, {modules:'system'})))
.pipe(gulp.dest(paths.output + 'system'));
});

gulp.task('build', function(callback) {
return runSequence(
'clean',
['build-es6', 'build-commonjs', 'build-amd', 'build-system'],
callback
);
});
9 changes: 9 additions & 0 deletions build/tasks/clean.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var gulp = require('gulp');
var paths = require('../paths');
var del = require('del');
var vinylPaths = require('vinyl-paths');

gulp.task('clean', function() {
return gulp.src([paths.output])
.pipe(vinylPaths(del));
});
10 changes: 10 additions & 0 deletions build/tasks/dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var gulp = require('gulp');
var tools = require('aurelia-tools');

gulp.task('update-own-deps', function(){
tools.updateOwnDependenciesFromLocalRepositories();
});

gulp.task('build-dev-env', function () {
tools.buildDevEnv();
});
14 changes: 14 additions & 0 deletions build/tasks/doc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var gulp = require('gulp');
var tools = require('aurelia-tools');
var paths = require('../paths');
var yuidoc = require('gulp-yuidoc');

gulp.task('doc-generate', function(){
return gulp.src(paths.source)
.pipe(yuidoc.parser(null, 'api.json'))
.pipe(gulp.dest(paths.doc));
});

gulp.task('doc', ['doc-generate'], function(){
tools.transformAPIModel(paths.doc);
});
10 changes: 10 additions & 0 deletions build/tasks/lint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var gulp = require('gulp');
var paths = require('../paths');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');

gulp.task('lint', function() {
return gulp.src(paths.source)
.pipe(jshint())
.pipe(jshint.reporter(stylish));
});
36 changes: 36 additions & 0 deletions build/tasks/prepare-release.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
var gulp = require('gulp');
var runSequence = require('run-sequence');
var paths = require('../paths');
var changelog = require('conventional-changelog');
var fs = require('fs');
var bump = require('gulp-bump');
var args = require('../args');

gulp.task('bump-version', function(){
return gulp.src(['./package.json', './bower.json'])
.pipe(bump({type:args.bump })) //major|minor|patch|prerelease
.pipe(gulp.dest('./'));
});

gulp.task('changelog', function(callback) {
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));

return changelog({
repository: pkg.repository.url,
version: pkg.version,
file: paths.doc + '/CHANGELOG.md'
}, function(err, log) {
fs.writeFileSync(paths.doc + '/CHANGELOG.md', log);
});
});

gulp.task('prepare-release', function(callback){
return runSequence(
'build',
'lint',
'bump-version',
'doc',
'changelog',
callback
);
});
25 changes: 25 additions & 0 deletions build/tasks/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
var gulp = require('gulp');
var karma = require('karma').server;

/**
* Run test once and exit
*/
gulp.task('test', function (done) {
karma.start({
configFile: __dirname + '/../../karma.conf.js',
singleRun: true
}, function(e) {
done();
});
});

/**
* Watch for file changes and re-run tests on each change
*/
gulp.task('tdd', function (done) {
karma.start({
configFile: __dirname + '/../../karma.conf.js'
}, function(e) {
done();
});
});
1 change: 1 addition & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('require-dir')('build/tasks');
76 changes: 76 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// Karma configuration
// Generated on Fri Dec 05 2014 16:49:29 GMT-0500 (EST)

module.exports = function(config) {
config.set({

// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',


// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jspm', 'jasmine'],

jspm: {
// Edit this to your needs
loadFiles: ['src/**/*.js', 'test/**/*.js']
},


// list of files / patterns to load in the browser
files: [],


// list of files to exclude
exclude: [
],


// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'test/**/*.js': ['babel'],
'src/**/*.js': ['babel']
},
'babelPreprocessor': {
options: {
sourceMap: 'inline',
modules: 'system',
moduleIds: false
}
},

// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],


// web server port
port: 9876,


// enable / disable colors in the output (reporters and logs)
colors: true,


// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,


// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,


// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],


// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false
});
};
22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "aurelia-cli",
"version": "0.1.0",
"description": "The command line tooling for Aurelia, used for creating projects, scaffolding, bundling and more.",
"keywords": [
"aurelia",
"cli",
"bundle",
"scaffold"
],
"homepage": "http://aurelia.io",
"bugs": {
"url": "https://github.com/aurelia/cli/issues"
},
"license": "MIT",
"author": "Rob Eisenberg <[email protected]> (http://robeisenberg.com/)",
"main": "dist/commonjs/index.js",
"repository": {
"type": "git",
"url": "https://github.com/aurelia/cli"
}
}

0 comments on commit 3906764

Please sign in to comment.