Code Monkey home page Code Monkey logo

ancoopa / static-pages-bundler Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 2.0 193 KB

A simple library that creates a bundle of a simple web page that uses classic `<link ...>` and `<script ...>` way to connect a bunch of CSS and JS files to the HTML template. An entry point is your `index.html`. All the connected CSS, JS found by their paths in the `index.html`. Then the data parsed and compressed into three files: `index.html`, `bundle.css` and `bundle.js`.

Home Page: https://www.npmjs.com/package/static-pages-bundler

JavaScript 93.87% CSS 0.76% HTML 5.37%

static-pages-bundler's People

Contributors

ancoopa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

static-pages-bundler's Issues

Fails when <Bundler CSS start> contains links to the cdn

I used sudo to run command, because of isse #1 and here is the error:

Error: ENOENT: no such file or directory, open 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css'

Part of the index.html is next

<!-- Bootstrap CSS -->
		<!-- Bundler CSS start -->
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
		<link type="text/css" rel="stylesheet" href="./css/main.css">
		<!-- Fonts -->
		<link href="https://fonts.googleapis.com/css?family=Montserrat:400,500,600,700,800,900" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="./fullPage/jquery.fullPage.min.css" />
		<!-- Bundler CSS end -->

I assume this should be mentioned on the docs somehow.

Permission denied while the /dist exists

Env:
xubuntu 18.04
node v8.11.4

Structure:

drwxrwxr-x  2 anton anton  4096 кві 22 18:10 dist/
-rw-rw-r--  1 anton anton 16789 кві 22 18:06 index.html

Error

/home/anton/.nvm/versions/node/v8.11.4/lib/node_modules/static-pages-bundler/bundler/modules/fileManager.js:56
        throw err;
        ^

Error: EACCES: permission denied, mkdir '/dist'
    at Object.fs.mkdirSync (fs.js:885:18)
    at FileManager.checkCreateDirsForFile (/home/anton/.nvm/versions/node/v8.11.4/lib/node_modules/static-pages-bundler/bundler/modules/fileManager.js:53:14)
    at FileManager.createWriteFile (/home/anton/.nvm/versions/node/v8.11.4/lib/node_modules/static-pages-bundler/bundler/modules/fileManager.js:26:10)
    at Bundler.processBundleUnit (/home/anton/.nvm/versions/node/v8.11.4/lib/node_modules/static-pages-bundler/bundler/index.js:66:29)
    at Bundler.createBundle (/home/anton/.nvm/versions/node/v8.11.4/lib/node_modules/static-pages-bundler/bundler/index.js:21:10)
    at Object.<anonymous> (/home/anton/.nvm/versions/node/v8.11.4/lib/node_modules/static-pages-bundler/index.js:22:9)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)

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.