Permalink
Browse files

feat(project): build typescript, jspm17, webpack, aurelia-cli compatible

  • Loading branch information...
doktordirk committed Jul 22, 2016
1 parent 00004d3 commit c1891a276c601a39e5f96d07a29759b4550575b0
@@ -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
@@ -0,0 +1,6 @@
{
"extends": "./node_modules/aurelia-tools/.eslintrc.json",
"rules": {
"no-new-func": 0
}
}
@@ -0,0 +1,3 @@
jspm_packages
bower_components
.idea
@@ -0,0 +1,24 @@
{
"output": true,
"plugins": {
"lint": {
"maximum-line-length": false,
"heading-style": "atx",
"no-duplicate-headings": false,
"no-undefined-references": false,
"no-shortcut-reference-link": false,
"no-heading-punctuation": ".,;:!",
"list-item-indent": false
}
},
"settings": {
"gfm": true,
"bullet": "*",
"closeAtx": false,
"fences": true,
"listItemIndent": "1",
"rule": "-",
"ruleRepetition": 10,
"ruleSpaces": false
}
}
@@ -0,0 +1,15 @@
language: node_js
node_js:
- '0.12'
before_install:
- npm install -g jspm
- jspm config registries.github.auth U3Bvb25YOjY2NWIxYWQ2ZTM4ZjUxZGNjMzcwNDBkYzMxYjgxZGVkZjE1M2RjYjg=
before_script:
- jspm -v
- jspm i
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
notifications:
email:
on_success: change
on_failure: change
@@ -0,0 +1,32 @@
{
"name": "aurelia-datatable",
"version": "0.0.12",
"description": "Aurelia-only data tables",
"keywords": [
"aurelia",
"data",
"table",
"datatable",
"spoonx"
],
"moduleType": "node",
"homepage": "https://github.com/SpoonX/aurelia-datatable#readme",
"license": "MIT",
"author": "RWOverdijk <wesley@spoonx.nl>",
"contributors": [
"VMBindraban <vijay@spoonx.nl>",
"jeremyvergnas <jeremy@sweebr.com"
],
"main": "dist/commonjs/datatable.js",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/SpoonX/aurelia-datatable.git"
},
"dependencies": {
"aurelia-framework": "^1.0.0-rc.1.0.6",
"aurelia-orm": "^3.0.0-rc4",
"aurelia-pager": "^0.0.5",
"aurelia-router": "^1.0.0-rc.1.0.1",
"aurelia-view-manager": "^0.0.5"
}
}
@@ -1,14 +1,13 @@
var yargs = require('yargs');
var argv = yargs.argv;
var validBumpTypes = 'major|minor|patch|prerelease'.split('|');
var bump = (argv.bump || 'patch').toLowerCase();
var argv = yargs.argv,
validBumpTypes = "major|minor|patch|prerelease".split("|"),
bump = (argv.bump || 'patch').toLowerCase();
if (validBumpTypes.indexOf(bump) === -1) {
if(validBumpTypes.indexOf(bump) === -1) {
throw new Error('Unrecognized bump "' + bump + '".');
}
module.exports = {
bump: bump,
depth: parseInt(argv.depth || '0')
bump: bump
};
@@ -2,7 +2,7 @@ var path = require('path');
var paths = require('./paths');
exports.base = function() {
return {
var config = {
filename: '',
filenameRelative: '',
sourceMap: true,
@@ -11,14 +11,27 @@ exports.base = function() {
moduleIds: false,
comments: false,
compact: false,
code:true,
presets: [ 'es2015-loose', 'stage-1'],
code: true,
presets: [ 'es2015-loose', 'stage-1' ],
plugins: [
'syntax-flow',
'transform-decorators-legacy',
'transform-flow-strip-types'
]
};
if (!paths.useTypeScriptForDTS) {
config.plugins.push(
['babel-dts-generator', {
packageName: paths.packageName,
typings: '',
suppressModulePath: true,
suppressComments: false,
memberOutputFilter: /^_.*/,
suppressAmbientDeclaration: true
}]
);
};
config.plugins.push('transform-flow-strip-types');
return config;
}
exports.commonjs = function() {
@@ -44,3 +57,9 @@ exports.es2015 = function() {
options.presets = ['stage-1']
return options;
};
exports['native-modules'] = function() {
var options = exports.base();
options.presets[0] = 'es2015-loose-native-modules';
return options;
}
@@ -1,13 +1,36 @@
var path = require('path');
var fs = require('fs');
// hide warning //
var emitter = require('events');
emitter.defaultMaxListeners = 5;
var appRoot = 'src/';
var outputRoot = 'dist/';
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
module.exports = {
var paths = {
root: appRoot,
source: appRoot + '**/*.js',
html: appRoot + '**/*.html',
style: 'styles/**/*.css',
output: outputRoot,
output: 'dist/',
doc:'./doc',
e2eSpecsSrc: 'test/e2e/src/*.js',
e2eSpecsDist: 'test/e2e/dist/'
test: 'test/**/*.js',
exampleSource: 'doc/example/',
exampleOutput: 'doc/example-dist/',
packageName: pkg.name,
ignore: [],
useTypeScriptForDTS: false,
importsToAdd: [],
importsToIgnoreForDts: [], // imports that are only used internally. no need to d.ts export them
jsResources: [appRoot+ 'datatable.js', appRoot+ 'columns-filter.js'], // js to transpile, but not be concated and keeping their relative path
resources: appRoot + '{**/*.css,**/*.html}',
sort: true,
concat: true
};
// files to be traspiled (and concated if selected)
paths.mainSource = [paths.source].concat(paths.jsResources.map(function(resource) {return '!' + resource;}));
// files to be linted
paths.lintSource = paths.source;
module.exports = paths;
Oops, something went wrong.

0 comments on commit c1891a2

Please sign in to comment.