Giter Club home page Giter Club logo

gulp-static-hash's People

Contributors

anhulife avatar simon04 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gulp-static-hash's Issues

What about "svg-sprites" ?

for example:

before

<svg>
   <use xlink:href="/assets/images/icon.svg#my-svg-sprite"></use>
</svg>

after

<svg>
   <use xlink:href="/assets/images/icon.svg?v=fa661cd#my-svg-sprite"></use>
</svg>

关于参数 static

md5BuildAsset: 'static'

The path to assets in your project used by create md5 file

抱歉,我没能明白这个参数的作用是什么?

关于参数 asset 不起作用的疑问

Hi,我遇到一个 asset 参数不起作用的问题。

我的动态文件路径是这个:

/WEB-INF/views/index.jsp

资源目录是这个

/src/index.js

我是这样引用的

<script  src="src/index.js"></script>

所以使用 gulp-static-hash 时,我指定了 asset 参数为:'某某路径/'

很奇怪的是居然没有效果,于是我查看源代码。
里面对这个参数作了判断,只有开头为 /的路径才能生效 asset参数。

// 源代码
            if (/^\//.test(filePath)) {
                fullPath = path.resolve(asset, filePath.slice(1));
            } else {
                fullPath = path.resolve(mainPath, filePath);
            }

很奇怪为什么要这样做,因为会导致参数无效。

会将原有的参数给覆盖掉

例如:

<script src="/assets/js/main.js?appkey=12382304890"></script>

会变为:

<script src="/assets/js/main.js?v=4dad661"></script>

文档 src 有误

src 地址应该是 html 文件而不是 css 文件:

gulp.src('static/**/*.html')

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.