Skip to content

Commit a7ebbaa

Browse files
author
Ignacio
committed
Initial commit
0 parents  commit a7ebbaa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+11905
-0
lines changed

.eslintrc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
parser: "babel-eslint",
3+
"plugins": [
4+
"react"
5+
],
6+
"env": {
7+
"browser": true,
8+
},
9+
"rules": {
10+
"strict":0,
11+
"no-unused-vars": 0,
12+
"no-console": 1,
13+
"semi": ["error", "always"],
14+
"allowImportExportEverywhere": 0,
15+
"comma-dangle": [1, { //when to use the last comma
16+
"arrays": "never",
17+
"objects": "never",
18+
"imports": "never",
19+
"exports": "never",
20+
"functions": "ignore",
21+
}],
22+
"react/jsx-indent": ["error", 4],
23+
"react/prop-types": [2]
24+
},
25+
"extends": ["eslint:recommended", "plugin:react/recommended"]
26+
}

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# testing
7+
/coverage
8+
9+
# production
10+
/build
11+
12+
# misc
13+
.DS_Store
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
19+
npm-debug.log*
20+
yarn-debug.log*
21+
yarn-error.log*

.htaccess

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<IfModule mod_rewrite.c>
2+
3+
RewriteEngine On
4+
RewriteBase /
5+
RewriteRule ^index\.html$ - [L]
6+
RewriteCond %{REQUEST_FILENAME} !-f
7+
RewriteCond %{REQUEST_FILENAME} !-d
8+
RewriteCond %{REQUEST_FILENAME} !-l
9+
RewriteRule . /index.html [L]
10+
11+
</IfModule>

4geeks.ico

19.3 KB
Binary file not shown.

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Collaborative React App!
2+
3+
Group 1: ***NavBar/Login View (Session)*** | https://getbootstrap.com/docs/4.1/examples/carousel/ & https://getbootstrap.com/docs/4.1/examples/sign-in/
4+
5+
Group 2: ***Landing Page with Carousel (Products and Posts)*** | https://getbootstrap.com/docs/4.1/examples/carousel/
6+
7+
Group 3: ***Blog/Post View (Posts)*** | https://getbootstrap.com/docs/4.1/examples/blog/
8+
9+
Group 4: ***Store/Checkout (Products)*** | https://getbootstrap.com/docs/4.1/examples/product/ & https://getbootstrap.com/docs/4.1/examples/checkout/
10+
11+
12+
This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).

deploy-to-github.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
var ghpages = require('gh-pages');
2+
var Console = require('bc-console');
3+
var webpack = require('webpack');
4+
var path = require('path');
5+
var fs = require('fs');
6+
7+
var remoteOriginUrl = require('remote-origin-url');
8+
var gh = require('parse-github-url');
9+
10+
if (!fs.existsSync(path.resolve(__dirname,'.git'))){
11+
Console.error("No repository found on this project");
12+
Console.help("Follow this steps to create a new repository for your project: http://kbroman.org/github_tutorial/pages/init.html");
13+
return;
14+
}
15+
16+
const origin = remoteOriginUrl.sync();
17+
if(!origin || origin==''){
18+
Console.error("No remote origin has been found on this repository");
19+
Console.help(`Check your remote by doing:
20+
$ git remote get-url origin
21+
22+
Add your remote by doing:
23+
$ git remote add origin <github_repository_url>
24+
`);
25+
return;
26+
}
27+
Console.info("The remote was found successfully, starting the deploy from here: "+origin);
28+
29+
const repository = gh(origin);
30+
const compiler = webpack(require(path.resolve(__dirname, 'webpack.config.js')));
31+
compiler.run((err, stats) => {
32+
if (err || stats.hasErrors()) {
33+
console.log(stats.toString({
34+
colors: true
35+
}));
36+
Console.error("There was an error compiling, review above");
37+
return;
38+
}
39+
Console.success("Your code compiled successfully, proceding to deploy...");
40+
ghpages.publish('public', function(err) {
41+
if(err){
42+
console.error(err);
43+
Console.error("There was an error publishing your website");
44+
return;
45+
}
46+
//https://<github_user>.github.io/<repository-name>
47+
Console.success(`Your website has been deployed successfully here: https://${repository["owner"]}.github.io/${repository["name"]}/`);
48+
});
49+
});

dist/index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Hello React World</title>
5+
</head>
6+
<body>
7+
<div id="app"></div>
8+
<script type="text/javascript" src="./bundle.js"></script>
9+
</body>
10+
</html>

0 commit comments

Comments
 (0)