Skip to content

Commit

Permalink
Fix build so that it runs and works.
Browse files Browse the repository at this point in the history
Update requirejs
get i18n working
get minify and exclusion of hbs resources working. Doesn't need all.js anymore.
fix bad path to partial.
  • Loading branch information
chris-rink-veeva committed Jul 7, 2015
1 parent ded0a41 commit 96188fa
Show file tree
Hide file tree
Showing 9 changed files with 27,124 additions and 24,957 deletions.
5 changes: 2 additions & 3 deletions demo-build.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
// Normally, just drop it in the same place as require.js and it'll work fine.
// Essentially just ignore this.
paths : {
'hbs' : '../hbs',
'Handlebars' : '../Handlebars'
'hbs' : '../hbs'
}
};</script>
<script src="demo-build/require.js" data-main="demo-build/main.js"></script>
Expand Down Expand Up @@ -45,4 +44,4 @@
Note 2: Generally you won't have 2 different html files for the build and dev modes. Normally you'd just serve the built directory on production where the non-build directory is on your dev server. So your template never have to change, just your static directory switched out.
</p>
</body>
</html>
</html>
11 changes: 4 additions & 7 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,15 @@
templateExtension : 'hbs',
// if disableI18n is `true` it won't load locales and the i18n helper
// won't work as well.
disableI18n : false
i18n : true,
helperDirectory : "template/helpers/",
i18nDirectory: "template/i18n/"
},
// I change the path as to not duplicate the hbs.js and handlebars plugin.
// Normally, just drop it in the same place as require.js and it'll work fine.
// Essentially just ignore this.
paths : {
'hbs' : '../hbs',
'Handlebars' : '../Handlebars',
'underscore' : '../hbs/underscore',
'i18nprecompile' : '../hbs/i18nprecompile',
'json2' : '../hbs/json2'

'hbs' : '../hbs'
}
};</script>
<!-- use a common require.js and app injection method. -->
Expand Down
14 changes: 8 additions & 6 deletions demo/app.build.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@
// removes i18n precompiler, handlebars and json2
excludeAfterBuild: true
},
exclude: ["handlebars"],
include: ["handlebars.runtime"],

paths: {
"hbs": "../hbs",
"Handlebars" : "../Handlebars",
"underscore" : "../hbs/underscore",
"i18nprecompile" : "../hbs/i18nprecompile",
"json2" : "../hbs/json2"
"hbs": "../hbs"
// if your project is already using underscore.js and you want to keep
// the hbs plugin even after build (excludeHbs:false) you should set the
// "hbs/underscore" path to point to the shared location like
Expand All @@ -37,9 +35,13 @@
templateExtension : 'hbs',
// if disableI18n is `true` it won't load locales and the i18n helper
// won't work as well.
disableI18n : false
i18n : true,
helperDirectory : "template/helpers/",
i18nDirectory: "template/i18n/"
},



modules: [
{
name: "main"
Expand Down
Loading

0 comments on commit 96188fa

Please sign in to comment.