Skip to content

Commit

Permalink
Merge pull request #188 from sqlectron/fix-ci-build
Browse files Browse the repository at this point in the history
Fix ci build
  • Loading branch information
maxcnunes committed Jun 5, 2016
2 parents 6aad891 + 2cf14f4 commit 07c7b13
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 177 deletions.
15 changes: 3 additions & 12 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
{
"stage": 0,
"optional": ["runtime"],
"presets": ["es2015", "stage-0", "react"],
"plugins": ["transform-runtime"],
"env": {
"development": {
"plugins": ["react-transform"],
"extra": {
"react-transform": {
"transforms": [{
"transform": "react-transform-hmr",
"imports": ["react"],
"locals": ["module"]
}]
}
}
"presets": ["react-hmre"]
}
}
}
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,18 @@ addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
#- llvm-toolchain-precise-3.8
packages:
- libgnome-keyring-dev
- icnsutils
- clang-3.7
#- clang-3.8
- clang
- graphicsmagick

install:
- clang --version
- nvm install 6
- npm install npm -g
# - npm install npm -g
- npm prune
- npm install

Expand Down
9 changes: 6 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
},
"dependencies": {
"axios": "^0.7.0",
"babel": "^5.8.29",
"babel-core": "^5.8.29",
"babel-runtime": "^5.8.29",
"babel-core": "^6.9.1",
"babel-plugin-transform-runtime": "^6.9.0",
"babel-polyfill": "^6.9.1",
"babel-preset-es2015": "^6.9.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-0": "^6.5.0",
"debug": "^2.2.0",
"sqlectron-core": "^6.0.1"
}
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ platform:
- x64

cache:
- node_modules
- app\node_modules
- node_modules -> package.json
- app\node_modules -> package.json
- '%APPDATA%\npm-cache'
- '%USERPROFILE%\.electron'

Expand Down
38 changes: 21 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"license": "MIT",
"scripts": {
"postinstall": "install-app-deps",
"dev:webpack": "webpack-dev-server --config ./webpack.dev.config.js",
Expand All @@ -9,12 +8,13 @@
"clean:osx": "rimraf dist/Sqlectron-darwin-*",
"clean:win": "rimraf dist/win* dist/Sqlectron-win*",
"clean:linux": "rimraf dist/Sqlectron-linux-* dist/*.deb",
"compile": "rimraf app/out && cross-env NODE_ENV=production babel-node scripts/compile.js -v",
"build:osx": "npm run clean:osx && build --platform darwin",
"build:linux": "npm run clean:linux && build --platform linux --arch all",
"build:win": "npm run clean:win && build --platform win32 --arch all",
"dist": "npm run compile && build --arch all",
"dist:osx": "npm run compile && npm run build:osx",
"compile": "rimraf app/out && npm run compile:browser && npm run compile:renderer",
"compile:browser": "cross-env NODE_ENV=production babel ./src/browser -d app/out/browser",
"compile:renderer": "cross-env NODE_ENV=production webpack --progress --display-error-details --config ./webpack.prod.config",
"build:osx": "npm run clean:osx && build --osx",
"build:linux": "npm run clean:linux && build --linux",
"build:win": "npm run clean:win && build --windows",
"dist": "npm run compile && build",
"dist:winlinux": "npm run compile && npm run build:linux && npm run build:win"
},
"build": {
Expand All @@ -37,13 +37,17 @@
}
},
"devDependencies": {
"autoprefixer-loader": "^3.1.0",
"babel": "^5.8.29",
"babel-core": "^5.8.29",
"autoprefixer-loader": "^3.2.0",
"babel-cli": "^6.9.0",
"babel-core": "^6.6.5",
"babel-eslint": "^4.1.3",
"babel-loader": "^5.3.2",
"babel-plugin-react-transform": "^1.1.1",
"babel-runtime": "^5.8.29",
"babel-loader": "^6.2.4",
"babel-plugin-transform-runtime": "^6.9.0",
"babel-polyfill": "^6.9.1",
"babel-preset-es2015": "^6.9.0",
"babel-preset-react": "^6.5.0",
"babel-preset-react-hmre": "^1.1.1",
"babel-preset-stage-0": "^6.5.0",
"brace": "^0.7.0",
"breakpoint-sass": "^2.6.1",
"classnames": "^2.2.5",
Expand All @@ -53,17 +57,17 @@
"del": "^2.2.0",
"denodeify": "^1.2.1",
"electron-builder": "next",
"electron-packager": "^5.2.1",
"electron-prebuilt": "^1.2.1",
"eslint": "^1.7.3",
"eslint-config-airbnb": "^0.1.0",
"eslint-plugin-react": "^3.15.0",
"file-loader": "^0.8.5",
"fixed-data-table": "^0.6.0",
"history": "^1.12.6",
"html-webpack-plugin": "^1.6.2",
"html-webpack-plugin": "^2.19.0",
"imports-loader": "^0.6.5",
"jquery": "^2.2.0",
"json-loader": "^0.5.4",
"lodash": "^3.10.1",
"minimist": "^1.2.0",
"node-sass": "^3.4.2",
Expand All @@ -81,9 +85,9 @@
"redux-logger": "^2.2.1",
"redux-thunk": "^1.0.0",
"rimraf": "^2.5.2",
"sass-loader": "^3.1.2",
"sass-loader": "^3.2.0",
"spawn-auto-restart": "^2.0.1",
"style-loader": "^0.13.0",
"style-loader": "^0.13.1",
"url-loader": "^0.5.7",
"webpack": "^1.13.1",
"webpack-dev-middleware": "^1.6.1",
Expand Down
57 changes: 0 additions & 57 deletions scripts/compile.js

This file was deleted.

64 changes: 0 additions & 64 deletions scripts/publish-releases.sh

This file was deleted.

6 changes: 3 additions & 3 deletions src/browser/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ var devMode = (process.argv || []).indexOf('--dev') !== -1;

// enables ES6+ support
if (devMode) {
require('babel/register');
require('babel-register');

// load the app dependencies
var PATH_APP_NODE_MODULES = path.join(__dirname, '..', '..', 'app', 'node_modules');
require('module').globalPaths.push(PATH_APP_NODE_MODULES);
} else {
require('babel/polyfill');
}

require('babel-polyfill');

// starts the electron app
require('./app');
4 changes: 1 addition & 3 deletions src/browser/remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ import { remote } from 'electron';
/**
* Exposes to the renderer process any used API running on main process
*/
export default {
sqlectron: remote.require('sqlectron-core'),
};
export const sqlectron = remote.require('sqlectron-core');
4 changes: 2 additions & 2 deletions src/browser/update-checker.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from 'axios';
import createDebug from './debug';


const debug = require('./debug')('gh-update-checker');
const debug = createDebug('gh-update-checker');
const WAIT_2_SECS = 2000;


Expand Down
4 changes: 2 additions & 2 deletions src/renderer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@
<div id="content"></div>
<div id="loading-signal"></div>
<div id="loading"></div>
{% if (o.htmlWebpackPlugin.options.hot) { %}
<% if (htmlWebpackPlugin.options.hot) { %>
<script src="/webpack-dev-server.js"></script>
{% } %}
<% } %>
</body>
</html>
8 changes: 3 additions & 5 deletions src/renderer/store/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ export default function configureStore(initialState) {
const store = createStoreWithMiddleware(rootReducer, initialState);

if (module.hot) {
// Enable Webpack hot module replacement for reducers
module.hot.accept('../reducers', () => {
const nextReducer = require('../reducers');
store.replaceReducer(nextReducer);
});
module.hot.accept('../reducers', () =>
store.replaceReducer(require('../reducers').default)
);
}

return store;
Expand Down
3 changes: 1 addition & 2 deletions webpack.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
require('babel/polyfill');
require('babel-polyfill');

module.exports = {
debug: true,
Expand Down Expand Up @@ -58,7 +58,6 @@ module.exports = {
new HtmlWebpackPlugin({
hot: true,
template: 'src/renderer/index.html',
inject: 'body',
}),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development'),
Expand Down
3 changes: 1 addition & 2 deletions webpack.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
require('babel/polyfill');
require('babel-polyfill');

module.exports = {
devtool: 'eval-source-map',
Expand Down Expand Up @@ -87,7 +87,6 @@ module.exports = {
}),
new HtmlWebpackPlugin({
template: 'src/renderer/index.html',
inject: 'body',
}),
new webpack.ProvidePlugin({
Radium: 'radium',
Expand Down

0 comments on commit 07c7b13

Please sign in to comment.