kapouer / bundledom Goto Github PK
View Code? Open in Web Editor NEWBundle and transform javascript files, stylesheets, html imports and update DOM document
License: MIT License
Bundle and transform javascript files, stylesheets, html imports and update DOM document
License: MIT License
Some libs need special options like angular/angular#10618 (comment).
Let them be passed through cli.
Loading an import in an import produces incorrect javascript code that crashes on client.
Basically it needs to add some esm transform to browserify.
Currently, bundling a file without stylesheets will warn about missing pivot node,
it shouldn't since the bundle stylesheet is empty anyway. And it shouldn't write it to disk.
Warn when order of common files + specific files != initial specific files,
to help track issues with bundles.
The best way to deal with cache is to change the file name.
However in some situations the deployed file name must not change,
so appending a query string is the only way to go.
Bundling an import which loads a js file produces incorrect js that crashes on the client. Maybe this is related to issue #5. The .js file concerned is tab.js from semantic-ui.
It would automatically build common-xxx.js, common-xxx.css files and for each mypage.html a mypage.js, mypage.css file.
It would also append application version automatically.
project := $(shell node -p "require('./package').name")
version := $(shell node -p "require('./package').version")
bundledom = $(shell node -p 'require.resolve("bundledom/bin/bundledom")')
htmlFiles = $(patsubst public/%.html,public/bundles/%.html, $(shell fgrep -sl "<html" public/*.html | tr '\n' ' '))
bundleDir = public/bundles
bundle: clean $(htmlFiles)
clean:
rm -f public/bundles/*
public/bundles/%.html: public/%.html
file=`basename $<` \
name="$${file%.*}" \
$(bundledom) --root . \
--exclude public/assets/css/jquery-ui.min.css \
--exclude public/assets/css/bootstrap.min.css \
--exclude public/assets/js/jquery.min.js \
--html $@ \
--js $(bundleDir)/$*-$(version).js \
--css $(bundleDir)/$*-$(version).css \
$<
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.