Skip to content

Commit

Permalink
Merge pull request Lemoncode#22 from Lemoncode/master-front-end-ix-bu…
Browse files Browse the repository at this point in the history
…ndler-update

Master front end ix bundler update
  • Loading branch information
brauliodiez authored Nov 6, 2020
2 parents 18c9b16 + 665b955 commit b7e6c5f
Show file tree
Hide file tree
Showing 31 changed files with 59 additions and 59 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion 03-bundling/02-parcel/02-es6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"build": "rimraf dist && parcel ./src/index.html",
"build:prod": "rimraf dist && parcel build ./src/index.html",
"start": "rimraf dist && parcel ./src/index.html --open"
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
Expand Down
4 changes: 1 addition & 3 deletions 03-bundling/02-parcel/03-custom-css/src/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<html>
<body>
<h1>Check the console log</h1>
<div class="red-background">
RedBackground stuff
</div>
<div class="red-background">RedBackground stuff</div>
<script src="./index.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion 03-bundling/02-parcel/03-custom-css/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "./mystyles.css";
import './mystyles.css';

const sampleNumber = 1;
console.log(`Hello from sample ${sampleNumber}`);
2 changes: 1 addition & 1 deletion 03-bundling/02-parcel/04-sass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"devDependencies": {
"parcel-bundler": "^1.12.4",
"rimraf": "^3.0.2",
"sass": "^1.26.3"
"sass": "^1.29.0"
}
}
4 changes: 1 addition & 3 deletions 03-bundling/02-parcel/04-sass/src/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<html>
<body>
<h1>Check the console log</h1>
<div class="red-background">
RedBackground stuff
</div>
<div class="red-background">RedBackground stuff</div>
<script src="./index.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions 03-bundling/02-parcel/05-bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"devDependencies": {
"parcel-bundler": "^1.12.4",
"rimraf": "^3.0.2",
"sass": "^1.26.3"
"sass": "^1.29.0"
},
"dependencies": {
"bootstrap": "^4.4.1"
"bootstrap": "^4.5.3"
}
}
7 changes: 4 additions & 3 deletions 03-bundling/02-parcel/05-bootstrap/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
href="../node_modules/bootstrap/dist/css/bootstrap.css"
/>
</head>

<body>
<h1>Check the console log</h1>
<div class="red-background">
RedBackground stuff
<div class="jumbotron">
<h1>Testing Bootstrap</h1>
<p>Bootstrap is the most popular ...</p>
</div>
<div class="red-background">RedBackground stuff</div>
<script src="./index.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions 03-bundling/02-parcel/06-images/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"devDependencies": {
"parcel-bundler": "^1.12.4",
"rimraf": "^3.0.2",
"sass": "^1.26.3"
"sass": "^1.29.0"
},
"dependencies": {
"bootstrap": "^4.4.1"
"bootstrap": "^4.5.3"
}
}
Binary file modified 03-bundling/02-parcel/06-images/src/content/logo_1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 03-bundling/02-parcel/06-images/src/content/logo_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions 03-bundling/02-parcel/06-images/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
href="../node_modules/bootstrap/dist/css/bootstrap.css"
/>
</head>

<body>
<h1>Check the console log</h1>
<div id="imgContainer"></div>
<img src="./content/logo_2.png" />
<div class="red-background">
RedBackground stuff
<div class="jumbotron">
<h1>Testing Bootstrap</h1>
<p>Bootstrap is the most popular ...</p>
</div>
<div class="red-background">RedBackground stuff</div>
<script src="./index.js"></script>
</body>
</html>
6 changes: 3 additions & 3 deletions 03-bundling/02-parcel/07-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"npm-run-all": "^4.1.5",
"parcel-bundler": "^1.12.4",
"rimraf": "^3.0.2",
"sass": "^1.26.3",
"typescript": "^3.8.3"
"sass": "^1.29.0",
"typescript": "^4.0.5"
},
"dependencies": {
"bootstrap": "^4.4.1"
"bootstrap": "^4.5.3"
}
}
Binary file modified 03-bundling/02-parcel/07-typescript/src/content/logo_1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 03-bundling/02-parcel/07-typescript/src/content/logo_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion 03-bundling/02-parcel/07-typescript/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
href="../node_modules/bootstrap/dist/css/bootstrap.css"
/>
</head>

<body>
<h1>Check the console log</h1>
<script src="./index.ts"></script>
Expand Down
2 changes: 1 addition & 1 deletion 03-bundling/02-parcel/08-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ _./src/index.html_
</html>
```

- Let's create the entry point in the [_index.js_](src/index.js) file (./src/index.js)
- Let's create the entry point in the [_index.ts_](src/index.ts) file (./src/index.tsx)

_./src/index.tsx_

Expand Down
16 changes: 8 additions & 8 deletions 03-bundling/02-parcel/08-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch",
"start:dev": "rimraf dist && parcel ./src/index.html --open",
"start": "run-p -l type-check:watch && start:dev"
"start": "run-p -l type-check:watch start:dev"
},
"keywords": [],
"author": "",
Expand All @@ -18,14 +18,14 @@
"npm-run-all": "^4.1.5",
"parcel-bundler": "^1.12.4",
"rimraf": "^3.0.2",
"sass": "^1.26.3",
"typescript": "^3.8.3"
"sass": "^1.29.0",
"typescript": "^4.0.5"
},
"dependencies": {
"@types/react": "^16.9.27",
"@types/react-dom": "^16.9.5",
"bootstrap": "^4.4.1",
"react": "^16.13.1",
"react-dom": "^16.13.1"
"@types/react": "^16.9.56",
"@types/react-dom": "^16.9.9",
"bootstrap": "^4.5.3",
"react": "^17.0.1",
"react-dom": "^17.0.1"
}
}
Binary file modified 03-bundling/02-parcel/08-react/src/content/logo_1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 03-bundling/02-parcel/08-react/src/content/logo_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion 03-bundling/02-parcel/08-react/src/hello.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import React from "react";

export const HelloComponent: React.FC = () => {
return <h2>Hello from React</h2>;
};
};
1 change: 0 additions & 1 deletion 03-bundling/02-parcel/08-react/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
href="../node_modules/bootstrap/dist/css/bootstrap.css"
/>
</head>

<body>
<h1>Check the console log</h1>
<div id="root"></div>
Expand Down
9 changes: 3 additions & 6 deletions 03-bundling/02-parcel/09-css-modules/.babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"presets": [
"@babel/preset-typescript",
"@babel/preset-react"
]
}
{
"presets": ["@babel/preset-typescript", "@babel/preset-react"]
}
5 changes: 3 additions & 2 deletions 03-bundling/02-parcel/09-css-modules/.postcssrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"modules": true

{
"modules": true
}
2 changes: 2 additions & 0 deletions 03-bundling/02-parcel/09-css-modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ export const HelloComponent: React.FC = () => {
};
```

> If you get a warning about using required, try: npm i @types/node --save-dev
- Let's run the sample.

```bash
Expand Down
25 changes: 13 additions & 12 deletions 03-bundling/02-parcel/09-css-modules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,28 @@
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch",
"start:dev": "rimraf dist && parcel ./src/index.html --open",
"start": "run-p -l type-check:watch && start:dev"
"start": "run-p -l type-check:watch start:dev"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.10.4",
"@babel/preset-react": "^7.10.4",
"@babel/preset-typescript": "^7.10.4",
"@babel/core": "^7.12.3",
"@babel/preset-react": "^7.12.5",
"@babel/preset-typescript": "^7.12.1",
"@types/node": "^14.14.6",
"npm-run-all": "^4.1.5",
"parcel-bundler": "^1.12.4",
"postcss-modules": "^3.2.0",
"postcss-modules": "^3.2.2",
"rimraf": "^3.0.2",
"sass": "^1.26.3",
"typescript": "^3.8.3"
"sass": "^1.29.0",
"typescript": "^4.0.5"
},
"dependencies": {
"@types/react": "^16.9.27",
"@types/react-dom": "^16.9.5",
"bootstrap": "^4.4.1",
"react": "^16.13.1",
"react-dom": "^16.13.1"
"@types/react": "^16.9.56",
"@types/react-dom": "^16.9.9",
"bootstrap": "^4.5.3",
"react": "^17.0.1",
"react-dom": "^17.0.1"
}
}
Binary file modified 03-bundling/02-parcel/09-css-modules/src/content/logo_1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 03-bundling/02-parcel/09-css-modules/src/content/logo_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions 03-bundling/02-parcel/09-css-modules/src/hello.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const classes = require("./mystyles.scss");
export const HelloComponent: React.FC = () => {
return (
<div className={classes.hello}>
<img src={logo} className={classes.logo}/>
<h2>Hello from React</h2>
<img src={logo} className={classes.logo} />
<h2>Hello from React</h2>
</div>
);
};
1 change: 0 additions & 1 deletion 03-bundling/02-parcel/09-css-modules/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
href="../node_modules/bootstrap/dist/css/bootstrap.css"
/>
</head>

<body>
<h1>Check the console log</h1>
<div id="root"></div>
Expand Down
8 changes: 6 additions & 2 deletions 03-bundling/02-parcel/09-css-modules/src/mystyles.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
$blue-color: teal;

.red-background {
background-color: $blue-color;
}

.hello {
background-color: $blue-color;

.logo{
width:150px;
.logo {
width: 150px;
}
}

0 comments on commit b7e6c5f

Please sign in to comment.