Git Product home page Git Product logo

devunltd / js-library-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
231.0 2.0 28.0 44.05 MB

Javascript Starter Boilerplate - Webpack 4, Babel 7, UMD, Hot Reloading, and more

Home Page: https://www.npmjs.com/package/@hodgef/js-library-boilerplate

License: MIT License

JavaScript 99.63% HTML 0.32% CSS 0.05%
javascript javascript-library boilerplate webpack4 webpack babel7 babel starter-kit library-boilerplate

js-library-boilerplate's People

Contributors

anandchowdhary avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar github-actions[bot] avatar hodgef avatar lukasz-pluszczewski 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  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  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

js-library-boilerplate's Issues

Global variable query

Hi, thanks for the boilerplate it saves lots of time.

Just a quick one, as far as I skim read to use the lib one's creates and if hosted on a CDN we need to first

let MyLibrary = window.MyLibrary.default;
let libraryInstance = new MyLibrary();

is it not possible to just pollute the global scope straight away without calling the default prop?

and is it possible to rename the global variable? didn't find any options so far (as in a custom name rather than MyLibrary).

Thanks again ๐Ÿ™

'loose' mode configuration must be the same for

After downloading, I use NPM run start to prompt this error. What settings should I set?

In the past, 2.6.108 was such a problem, and now 2.6.111 is also such a problem

'loose' mode configuration must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods
and @babel/plugin-proposal-private-property-in-object (when they are enabled).
22

Build library with Async Await syntax without polyfill

I ever create Async method with async/await syntax but when i build for my nodejs project it require polyfill thing.

class MyLibrary {
  ...
  // Sync method - that i use right now
  register(cb) {
    let someVariable = cb();
    return someVariable;
  }
  // Async method - that i want implement
  async register(cb) {
    let someVariable = await cb();
    return someVariable;
  }
  ...
}

Do you have any best practice to make async method with async/await syntax ?

How to get `webpack-bundle-analyzer` working?

When i am trying to use wbpack-bundle-analyzer with this bilorplate i get Cannot read property 'tapAsync' of undefined error. please give some advice on hove to resolve this issue?

Use with Typescript

Hello

I have an existing create-react-app application that I'm looking to convert to a library. The app is mainly Typescript but also contains a small amount of js. Is it possible to use this boilerplate to convert my app? If so, what changes do I need to make to allow it to work with Typescript?

Thanks.

What if I want to compile multiple projects?

What if I want to compile multiple projects?

Metaphor: Src / AAA/ index.js Corresponding output directory build / AAA

src/bbb/ index.js The corresponding output directory is build / BBB

Demo vs lib(question)

bit unclear as to what the difference and the choice to use between demo in src/ vs lib in src/. and how build vs demo are different. when building for production to be consumed is the build dir the only thing required

Demo didn't include bundle when run `npm start`

Hi, you created a cool template to speed up library development.

I have some problems.
I created a library called Fungsi Maju last week but when I ran npm start to test at demo, it started without any errors but when changing the script in the demo folder it didn't respond. I think the demo directory is not resolved by webpack, please check my repo.

Btw, npm run demo worked flawlessly.

How to make use of workbox caching?

I want to use the boilerplate to create a library that can be added from a cdn to other websites, is there any example of configuring workbox to precache the dependencies of the library? I tried adding workbox to an existing boilerplate and the service worker registration fails as the library is hosted on a different domain. 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.