GithubHelp home page GithubHelp logo

html-pages-brunch's Issues

Doesn't minify html-files outside of 'assets'

Had installed brunch by
$ brunch new proj -s es6,
istalled your plugin
npm install --save-dev html-pages-brunch
Added my HTML files outside of the folder app/assets, so they are now stored in app.

running brunch build --production does not add files in the folder public.

Is there any configuration I'm missing?

path access issue - [error] 7#7: *14 directory index of "/var/www/" is forbidden

Hi team,

what I am trying to do is move all my index.html to public/ and all other html files to /public/partials folder. My build is fine locally, but when I deploying, getting " [error] 7#7: *14 directory index of "/var/www/" is forbidden". looks like it is trying to access the absolute path. Any hints?

    htmlPages: {
        htmlMin: {
            caseSensitive: false,
            collapseBooleanAttributes: true,
            collapseInlineTagWhitespace: false,
            collapseWhitespace: true,
            conservativeCollapse: false,
            html5: true,
            includeAutoGeneratedTags: false,
            keepClosingSlash: false,
            minifyCSS: true,
            minifyJS: true,
            preserveLineBreaks: false,
            preventAttributesEscaping: false,
            processConditionalComments: true,
            removeAttributeQuotes: true,
            removeComments: true,
            removeEmptyAttributes: true,
            removeOptionalTags: true,
            removeScriptTypeAttributes: true,
            removeStyleLinkTypeAttributes: true,
            sortAttributes: true,
            sortClassName: true
        },
        destination: function(path) {               
            if ( path.includes('/index.html') ) {               
                return "index.html";
            }
            if ( path.includes("/") ) {
                var res = path.split("/");
                return "partials/" + res[res.length-1];
            }
            return path;
        },
        disabled: false
    },

Plugin works for too long

Hey,
I tried to place all files (~1000 html files) that previously were in assets folder to app folder.
This was done to make html and corresponding js files close to each other - so I don't have dig into assets folder every time I work on js file.

I tried to switch off the minifier with config, it did not help.

brunch watch: before this change it took ~ 4s to complete initial watch iteration
brunch watch: after this change it took more than 5 minutes, I stopped waiting and cancelled

I used this config:

plugins:
    htmlPages:
      removeComments: false
      removeCommentsFromCDATA: false
      removeCDATASectionsFromCDATA: false
      collapseBooleanAttributes: false
      useShortDoctype: false
      removeEmptyAttributes: false
      removeScriptTypeAttributes: false
      removeStyleLinkTypeAttributes: false
      collapseWhitespace: false
      minifyJS: false
      minifyCSS: false
      destination : (path) -> path.replace /^app[\/\\](.*)\.html$/, "$1.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.