Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AT] - added Webpack build tools, ESLint, etc #78

Merged
merged 6 commits into from
Jan 23, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true
},
"extends": "airbnb"
}
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,17 @@ all: darwin linux windows
# - wine and mono must be available to build Windows on another platform (brew install wine mono )

linux: npminstall
npm run webpack
@echo "Building $@"
npm run build-linux

darwin: npminstall
npm run webpack
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go in the npminstall target, doesn't make sense to duplicate it here. Let's rename npminstall to npmsetup and put both actions in there.

@echo "Building $@"
npm run build-darwin

windows: npminstall
npm run webpack
@echo "Building $@"
npm run build-windows

Expand All @@ -85,4 +88,3 @@ clean:

test:
npm test

11 changes: 4 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<link href="css/overrides.css" rel="stylesheet">
<link rel="stylesheet" href="css/font-awesome.min.css">
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<script src="js/jquery-3.2.1.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/src/jquery-3.2.1.min.js"></script>
<script src="js/src/popper.min.js"></script>
<script src="js/src/bootstrap.min.js"></script>
<script>if (window.module) module = window.module;</script>
</head>
<body>
Expand All @@ -30,9 +30,6 @@
</div>
</div>
</footer>
<script src="js/ui.js"></script>
<script>
init();
</script>
<script src="js/dist/bundle.js"></script>
</body>
</html>
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions js/cms-installer.js → js/src/cms-installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ var tar = require('tar');
var fs = require('fs');
var ddevShell = require('./ddev-shell');
var os = require('os');
var electron = require('electron');
var remote = electron.remote ? electron.remote : electron;
var dialog = remote.dialog;

/**
*
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions js/describe-site.js → js/src/describe-site.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var bootstrapModal = require('./bootstrap-modal');
var ddevShell = require('./ddev-shell');

/**
* Updates describe modal content with current site data and shows modal
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions js/site-cards.js → js/src/site-cards.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var ddevShell = require('./ddev-shell');
var electron = require('electron');

/**
* TEMPLATE - generates markup for the placeholder "add/create site" card
Expand Down
17 changes: 10 additions & 7 deletions js/ui.js → js/src/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
var state = {};
var electron = require('electron');
var dialog = require('electron').remote.dialog;
var ddevShell = require('./js/ddev-shell');
var updater = require('./js/distro-updater');
var siteCreator = require('./js/cms-installer');
var siteCard = require('./js/site-cards');
var describeSite = require('./js/describe-site');
var removeProject = require('./js/remove-project');
var ddevShell = require('./ddev-shell');
var updater = require('./distro-updater');
var siteCreator = require('./cms-installer');
var siteCard = require('./site-cards');
var describeSite = require('./describe-site');
var removeProject = require('./remove-project');

/**
* bootstraps application by initializing modules, downloading distros, starting ddev list polling
Expand Down Expand Up @@ -53,4 +53,7 @@ function renderUI(list) {
routerStatusText = (validRouterStates.indexOf(list[0].router_status) != -1) ? '' : routerStatusText;
}
$('.router-status-label').text(routerStatusText);
}
}

// main entry point of application
init();
Loading