Closed Bug 847685 Opened 12 years ago Closed 12 years ago

Write build script to deploy Fireplace as a packaged app

Categories

(Marketplace Graveyard :: Admin Tools, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
2013-03-28

People

(Reporter: cvan, Assigned: basta)

References

Details

(Whiteboard: [fireplace] p=)

Our build script could be based off `damper.js`: https://github.com/mozilla/fireplace/blob/master/damper.js 1. Compile our nunjucks (JS port of jinja) templates to `templates.js`. 2. Minify our CSS using clean-css. 3. Compile, optimize, and minify JS using requirejs (r.js + uglifyJS under the hood). 4. Pull in locales/*.ini files for each locale. 5. ZIP the contents: index.html locales/ manifest.webapp media/css/ media/fonts/ media/img/ media/js/ 6. Sign, seal, and deliver the package. 7. Smile.
Putting this in milestone+1 since it's a little early we think
Priority: -- → P2
Whiteboard: [fireplace] → [fireplace] p=
Target Milestone: --- → 2013-03-28
Fireplace will be submitted to the marketplace for signing, updates and so on? If so, any minification will hinder the review process and step 6 will involve submitting to the review queue.
(In reply to Andy McKay [:andym] from comment #2) > If so, any minification will hinder the review process Couldn't we just point to the source code?
That's not normally how its done for apps since there's no way to prove the source == minified values, but that's up for reviewers to decide.
The packaged app will not include minified JS or CSS, this bug is incorrect. The build script will be for the "spaceheater" version of the project, which will include bundled JS and CSS. The packaged app version will simply be the zipping of the /hearth directory.
Summary: Write build script to deploy Marketplace as a packaged app → Write build script to deploy Fireplace for the web
Also, it's my understanding that we shouldn't need to put the marketplace through a review. If we need to review our own app every week (and go through a 2-3 week review process for every release) then that's ludicrous. If we can't trust our own source code to **available from itself** then I'm not entirely sure what we're doing with our lives.
Spaceheater is a website, and not a packaged app. For a hosted app, I would expect minification of assets, in keeping with established best practices. I don't know why this would be different.
(In reply to Matt Basta [:basta] from comment #5) > The packaged app will not include minified JS or CSS, this bug is incorrect. We don't need to minify our CSS yes. But likely we'll still need to run r.js so requirejs compiles all our JS files to one instead of doing document.createElement('script') like it does during development. > The build script will be for the "spaceheater" version of the project, which > will include bundled JS and CSS. > > The packaged app version will simply be the zipping of the /hearth directory. Yep, that's what this bug is for. Zipping the directory. Bug 847688 covers the deployment of Marketplace as a hosted app.
Summary: Write build script to deploy Fireplace for the web → Write build script to deploy Fireplace as a packaged app
Ah, that wasn't clear from the bug summary. In that case, no minification is necessary for CSS. We might still want to run a r.js build- we should look at the startup speed for r.js -vs- individual files.
(In reply to Chris Van Wiemeersch [:cvan] from comment #8) > We don't need to minify our CSS yes. But likely we'll still need to run r.js > so requirejs compiles all our JS files to one instead of doing > document.createElement('script') like it does during development. I disagree. It's silly to have an extra step with no benefit (the files are technically already in memory), and bundling them will only make debugging harder. If we can avoid errors like "Cannot call method 'func' on undefined (r.js line 3)" then that's a huge step forward in our ability to quickly diagnose and solve problems.
(In reply to Matt Basta [:basta] from comment #10) > > But likely we'll still need to run r.js > > so requirejs compiles all our JS files to one instead of doing > > document.createElement('script') like it does during development. > > I disagree. It's silly to have an extra step with no benefit (the files are > technically already in memory), and bundling them will only make debugging > harder. If we can avoid errors like "Cannot call method 'func' on undefined > (r.js line 3)" then that's a huge step forward in our ability to quickly > diagnose and solve problems. I think it's worth investigating startup costs to see whether it's worth doing. probably isnt.
A 2-3 week review wait would be fun, but pointless. Likewise a full review. But if you are going to publish fireplace on the marketplace as a packaged app, you should probably think about a deployment process that uploads the app to the marketplace and code / policy change to our review process to allow that to be signed.
We have a makefile. https://github.com/mozilla/fireplace/blob/master/Makefile `make package` will produce a packaged app. Needs some tweaking to make it work super good, but it's a step in the right direction.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Assignee: nobody → mattbasta
Blocks: 859511
You need to log in before you can comment on or make changes to this bug.