Skip to content

Commit

Permalink
Updated to use NPM for packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
owensd committed Feb 8, 2017
1 parent 734e10c commit fc4e111
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,4 +3,5 @@
.out
.tmp
node_modules
.dist

6 changes: 0 additions & 6 deletions Gruntfile.js
@@ -1,11 +1,6 @@
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
"download-electron": {
version: "<%= pkg.config.electron.version %>",
outputDir: "<%= pkg.config.electron.installDir %>",
rebuild: true
},
"generate-manifest": {
name: "<%= pkg.name %>",
version: "<%= pkg.version %>",
Expand All @@ -27,7 +22,6 @@ module.exports = function(grunt) {
}
});

grunt.loadNpmTasks("grunt-download-electron");
grunt.loadNpmTasks("grunt-contrib-symlink");

grunt.registerTask("generate-manifest", "Generate the Electron manifest.", function() {
Expand Down
6 changes: 2 additions & 4 deletions package.json
Expand Up @@ -3,6 +3,8 @@
"version": "0.1.0",
"description": "Test configuration",
"devDependencies": {
"electron": "1.5.0",
"electron-packager": "^8.5.1",
"grunt": "^1.0.0",
"grunt-download-electron": "^2.1.4",
"grunt-contrib-symlink": "^1.0.0"
Expand All @@ -12,16 +14,12 @@
"config": {
"electron": {
"version": "1.5.0",
"installDir": ".deps/electron",
"manifestDir": ".out/app",
"main": "electron-host"
},
"symlink": {
"src": "ui/public",
"dest": ".out/app/public"
}
},
"scripts": {
"postinstall": "mkdir -p .deps/electron; grunt download-electron"
}
}
6 changes: 4 additions & 2 deletions project.clj
Expand Up @@ -20,7 +20,9 @@
["cljsbuild" "once" "main"]
["shell" "grunt" "generate-mainjs"]
["shell" "grunt" "symlink"]
["cljsbuild" "once" "ui"]]}
["cljsbuild" "once" "ui"]]
"electron-package" ["shell" "./node_modules/electron-packager/cli.js" ".out/app" "--out=.dist"]
"electron-clean" ["shell" "rm" "-rf" ".out" ".tmp" ".dist"]}

:cljsbuild {:builds {:main {:source-paths ["app/src"]
:incremental true
Expand All @@ -37,7 +39,7 @@
:incremental true
:assert true
:compiler {:output-to ".out/app/ui.js"
:output-dir ".out/lib/ui"
:output-dir ".out/app/lib/ui"
:warnings true
:elide-asserts true
:optimizations :none
Expand Down
2 changes: 1 addition & 1 deletion ui/public/index.html
Expand Up @@ -12,7 +12,7 @@ <h1>Hello World!</h1>
<p>Script was not loaded.</p>
</div>

<script type="text/javascript" src="../../lib/ui/goog/base.js"></script>
<script type="text/javascript" src="../lib/ui/goog/base.js"></script>
<script type="text/javascript" src="../ui.js"></script>
<script type="text/javascript">goog.require('blog_post.landing')</script>
</body>
Expand Down

0 comments on commit fc4e111

Please sign in to comment.