Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
{
"files.eol": "\n",
"git.fetchOnPull": true
"git.fetchOnPull": true,
"eslint.run": "onSave",
"eslint.workingDirectories": [
{
"directory": "lib",
"changeProcessCWD": true
},
{
"directory": "example",
"changeProcessCWD": true
}
]
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Added

- first party support for `sass` ([#41](https://github.com/JBKLabs/react-dev/issues/41))

## [0.5.0] - 2020-05-01

### Updated
Expand Down
7 changes: 0 additions & 7 deletions example/.vscode/extensions.json

This file was deleted.

6 changes: 0 additions & 6 deletions example/.vscode/settings.json

This file was deleted.

7 changes: 6 additions & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "src/index.js",
"scripts": {
"start": "jbk-scripts start",
"lint": "jbk-scripts lint src/**",
"lint": "jbk-scripts lint 'src/**'",
"build": "jbk-scripts build",
"configure": "jbk-scripts configure",
"eject": "jbk-scripts eject"
Expand All @@ -26,5 +26,10 @@
"react-router-dom": "5.0.1",
"styled-components": "4.3.2",
"uuid": "3.3.3"
},
"eslintConfig": {
"extends": [
"@jbknowledge"
]
}
}
1 change: 1 addition & 0 deletions example/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import '@babel/polyfill';

import store from './lib/store';
import App from './App';
import './styles/index.scss';

Comment thread
mauleb marked this conversation as resolved.
ReactDOM.render(
<Provider store={store}>
Expand Down
8 changes: 8 additions & 0 deletions example/src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$text-color: #444;
$background: #eee;

body {
font-family: Arial, Helvetica, sans-serif;
color: $text-color;
background-color: $background;
}
Comment thread
mauleb marked this conversation as resolved.
6 changes: 4 additions & 2 deletions lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"npm": ">= 5"
},
"scripts": {
"lint": "node src/scripts lint **/*.js",
"prepublish": "copyfiles ../CHANGELOG.md ../README.md ../LICENSE ./lib",
"lint": "node src/scripts lint '**/*.js'",
"prepublishOnly": "copyfiles ../CHANGELOG.md ../README.md ../LICENSE ./lib",
"postpublish": "rimraf CHANGELOG.md README.md LICENSE"
},
"main": "index.js",
Expand Down Expand Up @@ -51,9 +51,11 @@
"escape-string-regexp": "2.0.0",
"html-webpack-plugin": "4.0.0-beta.5",
"inquirer": "7.0.0",
"node-sass": "4.13.0",
"prettier": "1.18.2",
"read-pkg-up": "6.0.0",
"rimraf": "3.0.0",
"sass-loader": "8.0.0",
"shelljs": "0.8.3",
"style-loader": "0.23.1",
"webpack": "4.35.2",
Expand Down
5 changes: 4 additions & 1 deletion lib/src/config/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
node_modules
dist
dist
*.css
*.scss
*.sass
8 changes: 8 additions & 0 deletions lib/src/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ module.exports = {
{
test: /\.css$/,
use: [require.resolve('style-loader'), require.resolve('css-loader')]
},
{
test: /\.s[ac]ss$/,
use: [
require.resolve('style-loader'),
require.resolve('css-loader'),
require.resolve('sass-loader')
]
}
]
},
Expand Down
3 changes: 1 addition & 2 deletions lib/src/scripts/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ iterateUserEnvironment((key, value) => {
if (!envRegex.test(env)) {
log.debug(`${key} not found in env.js`);
return;
} else {
log.debug(`Replacing key: ${key}`);
}
log.debug(`Replacing key: ${key}`);

shell.sed('-i', envRegex, `${key}: '${value}'`, envPath);
});
Empty file modified lib/src/scripts/index.js
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions lib/src/util/elevate.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const configPath = path.join(
const appPath = appDirectory;

const elevate = async (files) => {
/* eslint-disable-next-line no-unused-vars */
for (const file of files) {
const srcPath = path.join(configPath, file);
const destPath = path.join(appPath, file);
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"nohoist": [
"**"
]
},
"scripts": {
"lint": "yarn workspaces run lint"
}
}
Loading