Skip to content

Commit bc3f9d3

Browse files
committed
fix(webpack setup)
1 parent 779fefa commit bc3f9d3

20 files changed

+93053
-76
lines changed

.node-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ DEPENDENCIES
6666
tzinfo-data
6767

6868
RUBY VERSION
69-
ruby 2.6.0p0
69+
ruby 2.6.2p47
7070

7171
BUNDLED WITH
7272
2.1.4

README.md

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ Hosted on:
77
[![Netlify Badge](https://www.netlify.com/img/global/badges/netlify-color-accent.svg)](https://basiljs2.netlify.com/)
88

99
This repo holds the [site/docs for Basil.js](https://basiljs.github.io/). The current state of development (develop branch) can be found here [basiljs2.netlify.com](https://basiljs2.netlify.com/)
10+
11+
## Prerequisits
12+
13+
- Ruby >= 2.6
14+
- Ruby Bundler
15+
- Node.js >= 10
16+
1017
## Update Basil API
1118

1219
If there are changes to the API of Basil.js you can update the data on this repo as follows.
@@ -55,37 +62,60 @@ To build these docs we are using [Webpack](https://webpack.js.org/) and [Jekyll]
5562

5663
Netlify will create a branch and deploy preview for you and you can see your changes online. Every push to your branch will trigger a new build and will be linked on the PR page.
5764

65+
66+
5867
To develop locally take a look at the steps below. 👇
5968

60-
### Markup + SCSS
69+
### Setup
70+
71+
```bash
72+
# Ruby/Jekyll setup
73+
gem install bundler
74+
bundle install
75+
76+
77+
# Node Webpack setup
78+
npm install
79+
# or
80+
npm ci
81+
```
82+
83+
### Markup & SCSS & JS
84+
85+
To run the full development process you need to run Webpack and Jekyll side by side. They are combined in a script call `dev`.
86+
87+
```bash
88+
npm run dev
89+
```
90+
91+
Your site will be served from [http://0.0.0.0:4000](http://0.0.0.0:4000)
92+
93+
### Markup
6194

6295
Most of the Jekyll [liquid magic](https://github.com/Shopify/liquid/wiki/Liquid-for-Designers) happens in `./_source`.
6396

6497
To develop in this run:
6598

6699
```bash
67-
# once
68-
bundle install
69-
bundle update
70100
# whenever you want to work on the markup/content
71101
# (the --limit_posts 1 --incremental flags are needed
72102
# because we have lots of pages and need to speedup the build)
73103
bundle exec jekyll serve --livereload --limit_posts 1 --incremental
104+
# in a second shell session run
74105
```
75106

76-
### Javascript
107+
### Javascript + SCSS
77108

78-
To work on the Javasscript of the site you need to run
109+
To work on the Javascript and SCSS of the site you need to run
79110

80111
```bash
81-
# once
82-
# needs npm v5.7 or higer
83-
npm ci
84112
# when you develop on it
85113
# (starts the webpack dev watch build toolchain)
86114
npm run webpack:dev
87115
```
88116

117+
118+
89119
## Recipes
90120

91121
Resize and crop multiple images using [`mogrify`](https://www.imagemagick.org/script/mogrify.php)
@@ -97,7 +127,7 @@ mogrify -resize 320x180^ -gravity Center -extent 320x180 -quality 100 -format pn
97127

98128
## License
99129

100-
Copyright (c) 2013-2019 Basil.js
130+
Copyright (c) 2013-2020 Basil.js
101131
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
102132
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
103133
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ url: "https://basiljs.github.io/" # the base hostname & protocol for your site,
2525
twitter_username: basil_js
2626
github_username: basiljs
2727

28+
host: 0.0.0.0
2829
# sass:
2930
# style: compressed
3031
# sass_dir: _sass

_source/_layouts/default.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
<div class="guidelines"></div>
3232
{% include footer.html %}
3333
</div>
34-
{% if jekyll.environment == "production" %}
34+
3535
<script src="/assets/js/vendors~main.bundle.js" type="text/javascript" defer></script>
36-
{% endif %}
36+
3737
<script src="/assets/js/main.bundle.js" type="text/javascript"></script>
3838
{% if page.layout == 'reference' or page.layout == 'entry' %}
39-
{% if jekyll.environment == "production" %}
39+
4040
<script src="/assets/js/vendors~reference.bundle.js" type="text/javascript" defer></script>
41-
{% endif %}
41+
4242
<script src="/assets/js/reference.bundle.js" type="text/javascript"></script>
4343
{% endif %}
4444
</body>

0 commit comments

Comments
 (0)