Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/webpack #211

Merged
merged 13 commits into from
Aug 14, 2018
Merged

Conversation

bm2u
Copy link
Contributor

@bm2u bm2u commented Aug 14, 2018

  • watching docs assets and src assets during development
  • live-reload with browser-sync
  • adjust webpack
  • usage of certain loaders and plugins

Winter Björn added 7 commits August 14, 2018 14:32
- usage of browser-sync to have live-reload
- stylelint inside build
- copy assets (popper.js) with CopyWebpackPlugin
- remove webpack-dev-server and use watch with browser-sync instead
- install missing dependencies for webpack build
Copy link
Member

@RobbieTheWagner RobbieTheWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a lot changing here. I'm curious what we gain from these changes?

.stylelintrc.js Outdated
// Handle lint violations as warnings.
// Otherwise build fails
defaultSeverity: 'warning'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build should fail for lint errors, we do not want this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rwwagner90, feel free to remove. No need to include.

.editorconfig Outdated
@@ -0,0 +1,14 @@
root = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we need this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer to https://editorconfig.org/. In my point of view it is a good way to handle different code styles on public projects.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We enforce styles with eslint and stylelint, so we should not need this, I don't think.

body {
height: 100%;
overflow: hidden; }
html,body{height:100%;overflow:hidden}body{background-color:#62c462;background-image:linear-gradient(-45deg, #62c462, #75beaa);font-family:"proxima-nova", "Helvetica Neue", sans-serif;margin:0}.button{border:2px solid #fff;color:#fff;cursor:pointer;display:inline-block;font-size:0.8em;font-weight:500;letter-spacing:3px;line-height:1.3em;padding:1em 1.25em;text-decoration:none;text-transform:uppercase;width:140px}.button.dark{background:#fff;color:#75beaa}@media (max-width: 568px){.button{display:block;margin:1em auto 0}}.hero-scroll{height:100%;overflow:auto;-webkit-overflow-scrolling:touch;width:100%}.hero-outer{-webkit-box-sizing:border-box;box-sizing:border-box;display:table;height:100%;padding:20px 0;width:100%}.hero-outer .hero-inner{margin:0 auto 1em;text-align:center;width:540px}@media (max-width: 600px){.hero-outer .hero-inner{width:340px}}@media (max-width: 360px){.hero-outer .hero-inner{width:200px}}.hero-outer .hero-inner h1,.hero-outer .hero-inner h2,.hero-outer .hero-inner h3,.hero-outer .hero-inner p{color:#fff;font-weight:normal;line-height:1;margin:0 0 20px}.hero-outer .hero-inner h3{font-size:1.3em;padding-top:13px}.hero-outer .hero-inner h1{padding-top:10px}.hero-outer .hero-inner>*{opacity:0.3;pointer-events:none;-webkit-transition:opacity 0.4s;transition:opacity 0.4s}body:not(.shepherd-active) .hero-outer .hero-inner>*{opacity:1;pointer-events:auto}.hero-outer .hero-inner .shepherd-target.shepherd-enabled{opacity:1;pointer-events:auto}.hero-outer .hero-followup{padding-top:20px}.shepherd-element.shepherd-transparent-text .shepherd-text{color:#3b744f}.shepherd-element .shepherd-content{max-width:100%;width:400px}.shepherd-element .shepherd-content a{color:"inherit"}.shepherd-element .shepherd-content footer .shepherd-buttons li .shepherd-button-example-primary{background:#55a892}pre{border:1px solid rgba(0,0,0,0.15);line-height:1.4em}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened here? Minification?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minification - yes. Please take a look at the sass-loader option of webpack.config.js 'outputStyle'. Use 'expanded' instead of 'compressed' to receive a human readable result.


<!-- Welcome docs styles -->
<link rel="stylesheet" href="/shepherd/docs/welcome/css/prism.css"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing these paths will not work. We need these paths for when we deploy to gh-pages.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem. I just thought it would be easier to understand.

@@ -1,9 +0,0 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good cleanup, don't know who committed this file...

@@ -17,26 +17,23 @@
"Chuck Carpenter <charleswcarpenter3@gmail.com>"
],
"scripts": {
"build": "webpack && yarn copy-deps",
"build": "yarn clean && webpack --mode production",
"postbuild": "rm -f dist/removable-*",
"clean": "rm -rf dist",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hadn't you suggested a cross platform option for this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need anything cross platform. Everything is generally UNIX based.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closed this PR #205 by myself. Adding Git to PATH seems to be a good solution.

@chuckcarpenter
Copy link
Member

screen shot 2018-08-14 at 7 29 24 am

Running yarn start locally and I see those errors loading the files in. Know why that is @bm2u?

@chuckcarpenter
Copy link
Member

Also, build will pass with update to .travis.yml to remove docs task

@bm2u
Copy link
Contributor Author

bm2u commented Aug 14, 2018

Hi @chuckcarpenter, the reason for errors in your browser console are the static path inside index.html. I commited relative paths, but Robert requested changes on this. So I reverted this file. Please refer to Commit 08928c2

@RobbieTheWagner
Copy link
Member

RobbieTheWagner commented Aug 14, 2018

@bm2u something needs to be done to prefix paths only when deployed to gh-pages, I believe. Alternatively, we could make the local server's root include /shepherd, then it should work for both right?

@RobbieTheWagner
Copy link
Member

@bm2u I believe we need to use a proxy for BrowserSync. I will give it a shot.

@RobbieTheWagner RobbieTheWagner changed the base branch from master to feature/webpack August 14, 2018 21:09
@RobbieTheWagner
Copy link
Member

I'm going to merge this into a branch and continue working on it from there.

@RobbieTheWagner RobbieTheWagner merged commit d788f29 into shipshapecode:feature/webpack Aug 14, 2018
RobbieTheWagner added a commit that referenced this pull request Aug 15, 2018
* Feature/webpack (#211)

* add editorconfig for consistent coding styles

* Set default severity for stylelint so that the build- and linting process does not fail

* use relative paths

* usage of inline maps for welcome page styles

* using webpack alias to resolve popper.js

* webpack config for all scss and js sources
- usage of browser-sync to have live-reload
- stylelint inside build
- copy assets (popper.js) with CopyWebpackPlugin

* adjust webpack build scripts
- remove webpack-dev-server and use watch with browser-sync instead
- install missing dependencies for webpack build

* remove unwanted property to make build fail on lin violations

* expand css output for welcome page styles

* - revert index.html (need these paths for when we deploy to gh-pages)

* insert final new line

* enforce styles with eslint and stylelint, so we should not need this file

* add routes to browserstack for local dev and testing

* Update yarn.lock

* Bump some deps

* Set module to vanilla src version

* Start splitting apart files

* remove yarn docs script

* add cy step and a build for the gh pages

* test:ci already runs cy

* Remove unnecessary global installs

* Further split apart steps and tours
@bm2u bm2u deleted the feature/webpack branch August 15, 2018 19:50
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.

3 participants