Giter Club home page Giter Club logo

gulp-version-number's People

Contributors

charanrajtc avatar codebykenny avatar shinate 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

Watchers

 avatar  avatar

gulp-version-number's Issues

support metadata such as <link>

Wondering if it's possible to target metadata such as <link> and <meta>.
I have these two cases:

<link rel="icon" href="/img/favicon.png">
<meta property="og:image" content="/img/share.png">

Thanks.

target just one file

Hi I'm trying to have the ?v= string applied just to one of the js included in index.html, how could I do?
This way produce error

const $ = gulpLoadPlugins();
const versionConfig = {
'value': '%MDS%',
'append': {
'key': 'v',
'to': ['css', 'script1.js'],
},
};

TypeError: Cannot read property '1' of null

if (_RULE[1]) {
^

TypeError: Cannot read property '1' of null
at Object.css (/var/www/html/project/node_modules/gulp-version-number/index.js:215:30)
at apply_append (/var/www/html/project/node_modules/gulp-version-number/index.js:200:46)
at /var/www/html/project/node_modules/gulp-version-number/index.js:309:51
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:528:3)

perl TMPL_VAR

Hi, i use gulp-version-number-0.1.7

Source:
<script src="<TMPL_VAR cdn_url>/js/embed.min.js"></script>

Result:
<script src="<TMPL_VAR cdn_url?v=0757b5c1a2b89ddc5a8ef49f1d17795d>/js/embed.min.js"></script>

Assert:
<script src="<TMPL_VAR cdn_url>/js/embed.min.js?v=0757b5c1a2b89ddc5a8ef49f1d17795d"></script>

How to fix this behavior?

Append breaking on AngularJS directive

Hello and thanks for a great utility - I wouldn't have been sure my approach to versioning is correct without it.

I'm running into an exception when it tries to replace an AngularJS directive though:

<img-crop/>

caused by this line:

var sts = content.match(/<img[^&gt;]*>/g);

Maybe this matching and the other similar lines can benefit from a space after the tag name, correct me if I'm wrong.

Add support for ng-href and on<events> in link tag

I found out that:

<link ng-href="themes/{{theme||'default'}}/css/style.css" rel="stylesheet" onerror="this.href='themes/experter/css/style.css'">

is being parsed as:

<link ng-href="themes/{{theme||?v=44edd1b317271634126140a94694357b'default'}}/css/style.css" rel="stylesheet" onerror="this.href='themes/experter/css/style.css'">

which is not the expected output. The expected output should be:

<link ng-href="themes/{{theme||'default'}}/css/style.css?v=44edd1b317271634126140a94694357b" rel="stylesheet" onerror="this.href='themes/default/css/style.css?v=44edd1b317271634126140a94694357b''">

I'm using version 0.1.7, using the version config as shown below:

const versionConfig = {
    'value': '%MDS%',
    'append': {
        'key': 'v',
        'to': ['js', 'css', 'sass'],
    },
};

Version string always be uppercase

gulp.src('src/*')
.pipe(version({
    value: 'v1.0.0',
    replaces: [
        /#version#/g
    ]
}))
.pipe(gulp.dest('dist'));

v1.0.0 will be with V1.0.0 in dest file. All alphabet in version string will be change to uppercase.
Please retain original version string.

index.js#L86

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.