Skip to content

make miss-plete browserify compatible#1

Open
dereke wants to merge 1 commit into
xavi:gh-pagesfrom
dereke:gh-pages
Open

make miss-plete browserify compatible#1
dereke wants to merge 1 commit into
xavi:gh-pagesfrom
dereke:gh-pages

Conversation

@dereke

@dereke dereke commented Nov 27, 2015

Copy link
Copy Markdown

added babel and browserify configuration so that this module can be used by browserify

@xavi

xavi commented Dec 15, 2015

Copy link
Copy Markdown
Owner

MissPlete is now published to npm, transpiled to ES5 and UMD. Does this make it Browserify compatible too? (See https://github.com/xavi/miss-plete#installation)

@hugomrdias

Copy link
Copy Markdown

no! why are you loading css in the bundle ?

right now its unusable without setting up full dev env with babel webpack etc etc

@xavi

xavi commented Jan 1, 2016

Copy link
Copy Markdown
Owner

By loading the CSS in the bundle, the CSS doesn't have to be separately included in the page.

No, there's no need to set up Babel or webpack to use MissPlete, because the bundle is in ES5 and webpack included the code that automatically adds the CSS to the page when the bundle is loaded. For example, do npm install miss-plete --save and now it can be included and used directly in your page with something like

<script src="node_modules/miss-plete/dist/bundle.js"></script>
<script>
  new MissPlete.default({
    input: document.querySelector('input[name="city"]'),
    options: [["Barcelona", "BCN"], ["San Francisco", "SF"]]
  });
</script>

@syropian

Copy link
Copy Markdown

@xavi It's not working for me with Browserify, the CSS fails to load:

Cannot find module '!!./../node_modules/css-loader/index.js!./miss-plete.css' from '/Users/user/Sites/Homestead/astral/node_modules/miss-plete/dist'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants