Giter Site home page Giter Site logo

ghosert / grunt-applymin Goto Github PK

View Code? Open in Web Editor NEW
37.0 37.0 6.0 533 KB

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

JavaScript 12.13% Python 87.11% CSS 0.76%

grunt-applymin's People

Contributors

ghosert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

grunt-applymin's Issues

parsing php

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".

Duplicated output dir specified

There are two places need to specify output dir

  1. endmin option in Gruntfile
  2. comment beginmin: /to/path/xyz.js

I think the second place is not necessary.

jsPattern failed to match script line

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>

Suggestion - provide option to not check for target in template

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.