Skip to content

Commit

Permalink
refactor(all): update repo structure
Browse files Browse the repository at this point in the history
  • Loading branch information
martingust committed Aug 19, 2016
1 parent 0badcf7 commit 7604759
Show file tree
Hide file tree
Showing 49 changed files with 653 additions and 3,470 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
7 changes: 7 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./node_modules/aurelia-tools/.eslintrc.json",
"rules": {
"no-cond-assign": 0,
"no-extend-native": 0
}
}
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/node_modules
**/jspm_packages
**/*.map
spec/**/*.js
dist/
node_modules
jspm_packages
bower_components
.idea
.DS_STORE
build/reports
11 changes: 3 additions & 8 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
source
spec
.vscode
typings
**/*.map
tsconfig.json
typings.json
gulpfile.js
jspm_packages
bower_components
.idea
3 changes: 0 additions & 3 deletions .travis.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .vscode/launch.json

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ To build the code, follow these steps.
```shell
npm test
```
5. You will find the compiled code in the `dist` folder, available in CommonJS module format.
5. You will find the compiled code in the `dist` folder, available in AMD, CommonJS and ES6 module formats.
25 changes: 25 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "aurelia-pal-nodejs",
"version": "0.1.0",
"description": "The Node.js-specific implementation of Aurelia's platform abstraction layer.",
"keywords": [
"aurelia",
"pal",
"nodejs"
],
"homepage": "http://aurelia.io",
"main": "dist/commonjs/aurelia-pal-nodejs.js",
"moduleType": "node",
"license": "MIT",
"authors": [
"Rob Eisenberg <[email protected]> (http://robeisenberg.com/)"
],
"repository": {
"type": "git",
"url": "http://github.com/aurelia/pal-nodejs"
},
"dependencies": {
"aurelia-pal": "^1.0.0",
"jsdom": "^9.2.1"
}
}
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
};
65 changes: 65 additions & 0 deletions build/babel-options.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
var path = require('path');
var paths = require('./paths');

exports.base = function() {
var config = {
filename: '',
filenameRelative: '',
sourceMap: true,
sourceRoot: '',
moduleRoot: path.resolve('src').replace(/\\/g, '/'),
moduleIds: false,
comments: false,
compact: false,
code: true,
presets: [ 'es2015-loose', 'stage-1' ],
plugins: [
'syntax-flow',
'transform-decorators-legacy',
]
};
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() {
var options = exports.base();
options.plugins.push('transform-es2015-modules-commonjs');
return options;
};

exports.amd = function() {
var options = exports.base();
options.plugins.push('transform-es2015-modules-amd');
return options;
};

exports.system = function() {
var options = exports.base();
options.plugins.push('transform-es2015-modules-systemjs');
return options;
};

exports.es2015 = function() {
var options = exports.base();
options.presets = ['stage-1']
return options;
};

exports['native-modules'] = function() {
var options = exports.base();
options.presets[0] = 'es2015-loose-native-modules';
return options;
}
61 changes: 61 additions & 0 deletions build/paths.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
var path = require('path');
var fs = require('fs');

var appRoot = 'src/';
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));

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/',
packageName: pkg.name
};var path = require('path');
var fs = require('fs');

// hide warning //
var emitter = require('events');
emitter.defaultMaxListeners = 20;

var appRoot = 'src/';
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));

var paths = {
root: appRoot,
source: appRoot + '**/*.js',
html: appRoot + '**/*.html',
style: 'styles/**/*.css',
output: 'dist/',
doc:'./doc',
e2eSpecsSrc: 'test/e2e/src/*.js',
e2eSpecsDist: 'test/e2e/dist/',
packageName: pkg.name,
ignore: [],
useTypeScriptForDTS: false,
importsToAdd: [],
sort: false
};

paths.files = [
'disposeable.js',
'dom.js',
'feature.js',
'global.js',
'index.js',
'nodejs-dom.js',
'nodejs-feature.js',
'nodejs-mutation-emulator.js',
'nodejs-mutation-observer.js',
'nodejs-platform.js',
'observer.js',
'performance.js',
'platform.js'
].map(function(file){
return paths.root + file;
});

module.exports = paths;
Loading

0 comments on commit 7604759

Please sign in to comment.