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

test: manual test #724

Merged
merged 1 commit into from Aug 16, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1,413 changes: 719 additions & 694 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions package.json
Expand Up @@ -25,6 +25,7 @@
"security": "npm audit",
"test:only": "cross-env NODE_ENV=test jest",
"test:watch": "cross-env NODE_ENV=test jest --watch",
"test:manual": "npm run build && webpack-dev-server test/manual/src/index.js --open --config test/manual/webpack.config.js",
"test:coverage": "cross-env NODE_ENV=test jest --collectCoverageFrom=\"src/**/*.js\" --coverage",
"pretest": "npm run lint",
"test": "cross-env NODE_ENV=test npm run test:coverage",
Expand All @@ -51,9 +52,9 @@
"@commitlint/config-conventional": "^8.1.0",
"@webpack-contrib/defaults": "^5.0.2",
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
"babel-jest": "^24.8.0",
"bootstrap-sass": "^3.3.5",
"babel-jest": "^24.9.0",
"bootstrap": "^4.3.1",
"bootstrap-sass": "^3.3.5",
"chokidar": "^2.1.6",
"commitlint-azure-pipelines-cli": "^1.0.2",
"cross-env": "^5.2.0",
Expand All @@ -65,13 +66,15 @@
"eslint-plugin-import": "^2.14.0",
"file-loader": "^4.2.0",
"husky": "^3.0.3",
"jest": "^24.8.0",
"jest": "^24.9.0",
"jest-junit": "^7.0.0",
"jquery": "^3.4.1",
"lint-staged": "^9.2.1",
"memory-fs": "^0.4.1",
"node-sass": "^4.5.0",
"npm-run-all": "^4.1.5",
"nyc": "^14.1.1",
"popper.js": "^1.15.0",
"prettier": "^1.15.2",
"raw-loader": "^3.1.0",
"sass": "^1.3.0",
Expand Down
40 changes: 0 additions & 40 deletions test/extractText/webpack.config.js

This file was deleted.

3 changes: 0 additions & 3 deletions test/hmr/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions test/hmr/entry.js

This file was deleted.

11 changes: 0 additions & 11 deletions test/hmr/index.html

This file was deleted.

7 changes: 0 additions & 7 deletions test/hmr/simple.scss

This file was deleted.

31 changes: 0 additions & 31 deletions test/hmr/webpack.config.js

This file was deleted.

145 changes: 145 additions & 0 deletions test/manual/index.html
@@ -0,0 +1,145 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>sass-loader manual test</title>
</head>
<body>
<h1 class="text-center">sass-loader manual tests</h1>
<div class="container">
<div class="row">
<div class="col-sm">
<div class="card my-2">
<svg
class="bd-placeholder-img card-img-top"
width="100%"
height="180"
xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice"
focusable="false"
role="img"
aria-label="Placeholder: Image cap"
>
<title>Placeholder</title>
<rect width="100%" height="100%" fill="#868e96"></rect>
</svg>
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
<div class="dropdown">
<button
class="btn btn-secondary dropdown-toggle my-2"
type="button"
id="dropdownMenuButton-1"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
Dropdown button
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm">
<div class="card my-2">
<svg
class="bd-placeholder-img card-img-top"
width="100%"
height="180"
xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice"
focusable="false"
role="img"
aria-label="Placeholder: Image cap"
>
<title>Placeholder</title>
<rect width="100%" height="100%" fill="#868e96"></rect>
</svg>
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
<div class="dropdown">
<button
class="btn btn-secondary dropdown-toggle my-2"
type="button"
id="dropdownMenuButton-2"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
Dropdown button
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm">
<div class="card my-2">
<svg
class="bd-placeholder-img card-img-top"
width="100%"
height="180"
xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice"
focusable="false"
role="img"
aria-label="Placeholder: Image cap"
>
<title>Placeholder</title>
<rect width="100%" height="100%" fill="#868e96"></rect>
</svg>
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
<div class="dropdown">
<button
class="btn btn-secondary dropdown-toggle my-2"
type="button"
id="dropdownMenuButton-3"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
Dropdown button
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>


<script async defer src="/dist/main.js"></script>
</body>
</html>
2 changes: 2 additions & 0 deletions test/manual/src/index.js
@@ -0,0 +1,2 @@
import 'bootstrap';
import './style.scss';
7 changes: 7 additions & 0 deletions test/manual/src/style.scss
@@ -0,0 +1,7 @@
@import "~bootstrap";

$color: azure;

body {
background: $color;
}
37 changes: 37 additions & 0 deletions test/manual/webpack.config.js
@@ -0,0 +1,37 @@
module.exports = {
devtool: 'source-map',
mode: 'development',
output: {
publicPath: '/dist/',
},
module: {
rules: [
{
test: /\.scss$/i,
use: [
{
loader: 'style-loader',
},
{
loader: 'css-loader',
options: {
sourceMap: true,
},
},
{
loader: require.resolve('../../dist/cjs.js'),
options: {
// eslint-disable-next-line global-require
implementation: require('sass'),
sourceMap: true,
},
},
],
},
],
},
devServer: {
hot: true,
contentBase: __dirname,
},
};