Skip to content

Instantly share code, notes, and snippets.

@aitoroses
Last active August 29, 2015 14:19
Show Gist options
  • Save aitoroses/f88ec7b6b29e66eb13cf to your computer and use it in GitHub Desktop.
Save aitoroses/f88ec7b6b29e66eb13cf to your computer and use it in GitHub Desktop.
Project Manifest file examples
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
language: node_js
node_js:
- "0.10"
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta charset="utf-8">
<link rel="apple-touch-icon" href="/assets/icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="/assets/icon.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="/assets/icon.png"/>
<title>ES6</title>
<!-- STYLES -->
</head>
<body>
<div id="app"><!-- CONTENT --></div>
<!-- DATA -->
<!-- SCRIPTS -->
<script src="bundle.js"></script>
</body>
</html>
var webpack = require('webpack');
var path = require('path');
module.exports = function (config) {
config.set({
browserNoActivityTimeout: 30000,
browsers: [ process.env.CONTINUOUS_INTEGRATION ? 'Firefox' : 'Chrome' ],
singleRun: process.env.CONTINUOUS_INTEGRATION === 'true',
frameworks: [ 'mocha' ],
files: [
'tests.webpack.js'
],
preprocessors: {
'tests.webpack.js': [ 'webpack', 'sourcemap' ]
},
reporters: [ 'dots' ],
webpack: {
devtool: '#inline-source-map',
module: {
loaders: [
{ test: /\.(js|jsx)$/, loader: 'babel-loader?stage=0', exclude: /node_modules/ }
]
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('test')
})
],
resolve: {
root: [path.resolve("node_modules")],
extensions: ['', '.js', '.jsx',],
}
},
webpackServer: {
noInfo: true
}
});
};
{
"name": "tessel-js",
"version": "1.0.1",
"description": "Mix functional reactive programming with immutable cursors for handling application state.",
"repository": {
"type": "git",
"url": "https://www.github.com/aitoroses/Tessel"
},
"main": "./build/global/tessel.js",
"scripts": {
"build-global": "rm -rf build/global && NODE_ENV=production webpack src/index.js build/global/tessel.js && NODE_ENV=production COMPRESS=1 webpack src/index.js build/global/tessel.min.js && echo \"gzipped, the global build is `gzip -c build/global/tessel.min.js | wc -c` bytes\"",
"test": "./node_modules/.bin/karma start"
},
"author": "Aitor Oses",
"license": "MIT",
"devDependencies": {
"axn": "^1.6.1",
"babel-core": "^5.1.4",
"babel-loader": "^5.0.0",
"expect": "^1.6.0",
"freezer-js": "^0.5.0",
"karma": "^0.12.31",
"karma-chrome-launcher": "^0.1.7",
"karma-cli": "0.0.4",
"karma-firefox-launcher": "^0.1.4",
"karma-mocha": "^0.1.10",
"karma-sourcemap-loader": "^0.3.4",
"karma-webpack": "^1.5.0",
"mocha": "^2.2.4",
"react": "^0.13.2",
"react-mixin": "^1.2.2",
"webpack": "^1.8.4",
"webpack-dev-server": "^1.8.0"
},
"dependencies": {
"bluebird": "^2.9.24",
"js-csp": "^0.4.0",
"superagent": "^1.2.0",
"superagent-bluebird-promise": "^2.0.2",
"transducers.js": "^0.3.2"
},
"peerDepedencies": {
"react": "^0.13.2"
}
}
var context = require.context('./src', true, /-test\.(js|jsx)$/);
context.keys().forEach(context);
var webpack = require('webpack');
var path = require('path');
var plugins = [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
})
];
if (process.env.COMPRESS) {
plugins.push(
new webpack.optimize.UglifyJsPlugin({
compressor: {
warnings: false
}
})
);
}
module.exports = {
output: {
library: process.env.ROOT_NAME || 'FamousAnimations',
libraryTarget: 'umd'
},
externals: [
{
"react": {
root: "React",
commonjs2: "react",
commonjs: "react",
amd: "react"
},
}
],
module: {
loaders: [
{ test: /\.js$/, loader: 'babel?stage=0', exclude: /node_modules/ },
]
},
resolve: {
root: [path.resolve("node_modules")],
extensions: ['', '.js', '.jsx',]
},
node: {
Buffer: false
},
plugins: plugins,
devtool: process.env.COMPRESS ? null : 'inline-source-map'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment