Permalink
Browse files

Updated to use NPM for packaging

  • Loading branch information...
owensd committed Feb 8, 2017
1 parent 734e10c commit fc4e11110b0ce1acd2f05ea44b89487c29b4de48
Showing with 8 additions and 13 deletions.
  1. +1 −0 .gitignore
  2. +0 −6 Gruntfile.js
  3. +2 −4 package.json
  4. +4 −2 project.clj
  5. +1 −1 ui/public/index.html
@@ -3,4 +3,5 @@
.out
.tmp
node_modules
.dist

@@ -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 %>",
@@ -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() {
@@ -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"
@@ -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"
}
}
@@ -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
@@ -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
@@ -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>

0 comments on commit fc4e111

Please sign in to comment.