Skip to content

ES6, Webpack, Babel and ESLint#10

Open
alperklc wants to merge 35 commits into
chrissy-dev:masterfrom
alperklc:feature/restructuration
Open

ES6, Webpack, Babel and ESLint#10
alperklc wants to merge 35 commits into
chrissy-dev:masterfrom
alperklc:feature/restructuration

Conversation

@alperklc

@alperklc alperklc commented Feb 3, 2018

Copy link
Copy Markdown
Contributor

This pull request includes restructurations for the component:

Added

  • ESLint for establishing and maintaining a code style
  • Babel for transpiling from ES6
  • Webpack for bundling
  • Initialize library from HTML file
  • ES6 to ES2015 transformation

Changed

  • Component markup moved into the source code.
  • Method, class and variable definitions are written ES6 style.

Removed

  • Gulp

Further improvements:

  • minify
  • SASS support
  • distinguish dev / prod environment on webpack config

@alperklc alperklc mentioned this pull request Feb 3, 2018
@alperklc alperklc changed the title ES6, Webpack, Babel and ESLint Work in progress: ES6, Webpack, Babel and ESLint Feb 4, 2018
@alperklc

alperklc commented Feb 7, 2018

Copy link
Copy Markdown
Contributor Author

I think we can merge it, decided to implement rest of my ideas later. Otherwise those changes might create lots of merge conflicts for others :) @chrisssycollins

@alperklc alperklc changed the title Work in progress: ES6, Webpack, Babel and ESLint ES6, Webpack, Babel and ESLint Feb 7, 2018
@chrissy-dev

chrissy-dev commented Feb 8, 2018

Copy link
Copy Markdown
Owner

@alperklc Nice work!!

Couple of things we still need to do:

  • Compile a build without sourceMaps inlined so the final version is much lighter.
  • Create a ./docs folder with the compiled JS and HTML and commit it to GitHub. This is where we will serve the demo on GitHub pages.
  • Move index.html into ./src as it's now compiled.

We could also perhaps:

  • Use document.querySelector in the constructor and let the user pass in either a class, data-id or ID like.
const vanillaCalendar = new VanillaCalendar.default('#v-cal')
  vanillaCalendar.init({
  disablePastDays: false
})
// constructor ...
this.calendar = document.querySelector(calendarEl)
...

Excellent work, great Pull Request! 🍦

@alperklc

alperklc commented Feb 8, 2018

Copy link
Copy Markdown
Contributor Author

Resolved all of the remarks! Will continue development in further merge requests :) @chrisssycollins

@alperklc

alperklc commented Feb 9, 2018

Copy link
Copy Markdown
Contributor Author

Now we have a different way for development. Just updated scripts on package.json.

npm run prepublish will copy css file and create the library transpiled to ES2015 into the dist folder.
npm run dev will update docs folder, serve files for local development and listen to the changes on the files in src folder.

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.

2 participants