ghosert / grunt-applymin Goto Github PK
View Code? Open in Web Editor NEWConcat, minify and revisioning css/js files in html template page and easily switch optimized/raw css/js references in the html template files.
License: MIT License
Concat, minify and revisioning css/js files in html template page and easily switch optimized/raw css/js references in the html template files.
License: MIT License
hello,
I have (not a trivial) situation
I want to include a php file
<?php $this_theme_path = get_template_directory_uri(); ?>
<!-- beginmin: <?php echo($this_theme_path); ?>/scripts/vendor.js -->
<script src="{{domain_url}}/src/path/to/jquery.js"></script>
<!-- endmin -->
and I'd like to get an output like :
<?php $this_theme_path = get_template_directory_uri(); ?>
<script src="<?php echo($this_theme_path); ?>/scripts/vendor.js"></script>
grunt applymin options:
...
options: {
staticPattern: /(src\/.*?\.(css|js))/i
}
and I've tried
staticPattern: //i
with no luck.
I'd appreciate if you'd help me with this "whim".
There are two places need to specify output dir
endmin
option in Gruntfile
beginmin: /to/path/xyz.js
I think the second place is not necessary.
jsPattern /<script\s+src\s*=\s*['"][\s\S]+?\.js[\s\S]+?>/gi
failed to match following content:
<script type="text/javascript" src="${domainURL}/resources/js/feature/xyz-rb1234.js"></script>
When I used the plugin I got this message:
Warning: In the file: views/frontend.swig, the target filename: public/dist/public.min.js is not referred by any css/js tags. Use --force to continue.
The problem is that I don't want the concatenated file in my template as it is named - I upload my assets to Amazon buckets so the path is different. Would be nice to have a flag that one can set to prevent that check from happening. I can get around it with my template tags but that's just messy.
Thanks
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.