linemanjs / lineman-plus-rails Goto Github PK
View Code? Open in Web Editor NEWAn example application that uses Lineman alongside Rails
Home Page: http://linemanjs.com/rails.html
An example application that uses Lineman alongside Rails
Home Page: http://linemanjs.com/rails.html
After fingerprinting and to mimic Rails, gzip the CSS & JS assets found in dist/ with a ".gz" appended extension.
We probably want to do a few things here:
If the rubygem did a lineman build and pulled in the assets under app/assets/javascripts and app/assets/stylesheets, we'd be able to avoid all the rails-mimicking.
So if the gem could wrap the assets:precompile task (@searls makes hand-wavy ๐ motion), then it might work like this (only thinking about JS & CSS support):
rake assets:precompile
is invoked, but before we let it run:npm install
in the project, blow up if node isn't found with instructions on installing node.lineman build
with cwd in the project; if the lineman bin isn't on PATH, then use the <project>/node_modules/.bin/lineman
bin.dist/js/**/*
into app/assets/javascripts/lineman
dist/css/**/*
into app/assets/stylesheets/lineman
assets:precompile
taskapp/assets/javascripts/lineman
and app/assets/stylesheets/lineman
.So this way if someone is working on a Rails template, they'd use a script include tag for lineman/app
for the main JS bundle. Rails will see this during precompile time and be sure to create that file as a manifest into public/assets
.
One potentially confusing point here is that if nothing in the rails app requires any lineman/*
JS or CSS paths, then nothing of the lineman app will get built into public/assets. It's a feature, but a confusing one for first time users, I'm sure..
I think we should disable the pages task for lineman-rails projects by default, since its most likely outcome will be to confuse users and we won't have a good way to bring that static HTML over to public/ in a sane way that wouldn't throw off normal people (especially if the default file is "index.html")
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.