Skip to content
This repository was archived by the owner on Sep 7, 2021. It is now read-only.

Commit b506d98

Browse files
committed
Deleted redundant files from /src/pages folder
1 parent d2999a3 commit b506d98

File tree

127 files changed

+143
-7000
lines changed

Some content is hidden

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

127 files changed

+143
-7000
lines changed

README.md

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,18 @@ ReactJS version of the original AdminLTE dashboard - https://github.com/almasaee
66

77
If you use React in your app, you might find some of these components useful!
88

9+
[View the complete list of available components](https://github.com/booleanhunter/ReactJS-AdminLTE/tree/master/src/components)
910

10-
### UPDATES:
11-
12-
- [UI Elements](https://github.com/booleanhunter/ReactJS-AdminLTE/tree/master/src/pages/ui-elements) turning up.
13-
14-
[Click here](http://ec2-52-74-208-196.ap-southeast-1.compute.amazonaws.com:8000/UI/general.html) to see it live
1511

12+
### Some available components in React:
1613

1714

1815
- [ReactJS Timeline](https://github.com/booleanhunter/ReactJS-AdminLTE/tree/master/src/components/#--timeline)
1916

2017
[Click here](http://ec2-52-74-208-196.ap-southeast-1.compute.amazonaws.com:8000/timeline.html) to see it live
2118

2219

23-
- [ReactJS Widgets](https://github.com/booleanhunter/ReactJS-AdminLTE/tree/master/src/components/widgets-page)
20+
- [ReactJS Widgets](https://github.com/booleanhunter/ReactJS-AdminLTE/tree/master/src/components)
2421

2522
[Click here](http://ec2-52-74-208-196.ap-southeast-1.compute.amazonaws.com:8000/widgets.html) to see a live preview!
2623

@@ -39,26 +36,34 @@ Will soon be populated with charts.
3936

4037
More stuff coming soon. Stay tuned!
4138

42-
##### Due to several work related commitments, the development rate is a little slow and I apologize for that. However, I'm looking for awesome folks :metal: who could contribute and help me maintain this project. If you have any queries that you may have on how to contribute, or you have just general questions about how to use the components in your app - feel free to shoot an email. I'll help you out! :smile_cat:
39+
### Instructions of Usage :
40+
- Run `npm install adminlte-reactjs`
41+
- Include the stylesheets for the components, similar to the [widgets page](https://github.com/booleanhunter/ReactJS-AdminLTE/blob/master/views/widgets.html)
42+
- Include the library `var reactjsAdminlte = require('adminlte-reactjs')`. You may prefer the AMD style or the import statement.
43+
- You can now begin using the components like this `var ProfileCard = reactjsAdminlte.ProfileCard`.
44+
- If you don't need all the components, then you can choose to include only specific ones rather than the entire library. This can reduce your JS bundle size significantly `var StatTile = require('adminlte-reactjs/src/components/stat-tile')`
45+
46+
### Contributing guidelines :
4347

48+
##### Due to several work related commitments, the development rate is a little slow and I apologize for that. However, I'm looking for awesome folks :metal: who could contribute and help me maintain this project.
4449

45-
#### Instructions to run
50+
#### Step 1 :
4651

4752
- Fork or clone this repo. Alternatively - if you have NPM installed, you can also do `npm install adminlte-reactjs`.
4853
- Install nodejs and NPM
4954
- Go to the project's root folder from your terminal and run `npm install`
5055
- Run `node server.js`
5156
- Going to [http://localhost:8000](http://localhost:8000) will render an empty dashboard skeleton in the client-side using ReactJS. Clicking on one of the dashboard options on the left pane displays the original dashboards from AdminLTE.
5257
- Go to [http://localhost:8000/widgets.html](http://localhost:8000/widgets.html) to see available widgets in ReactJS.
53-
- Use [React Developer Tools Chrome Extension](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en) to understand the components hierarchy and structure and to track down bugs.
58+
- Use [React Developer Tools Chrome Extension](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en) to understand the components hierarchy and structure and to track down bugs.
5459

60+
#### Step 2:
5561

56-
#### For development
57-
58-
- React Hot Loader can be used to ease your development workflow. This can be done by installing dev dependencies from `package.json` file. If you haven't, then
59-
run `npm install webpack-dev-server` and `npm install react-hot-loader`.
60-
- Then in your HTML, change your javascript bundles' source paths to point to the webpack-dev-server proxy in your `script` tags. So if you have something
61-
like this
62+
- Pick a [page](https://almsaeedstudio.com/themes/AdminLTE/index2.html) from the AdminLTE project to reactify it, or some widget that hasn't been reactified yet.
63+
- If the page for it doesn't exist in the repo, create one for it in the [views](https://github.com/booleanhunter/ReactJS-AdminLTE/tree/master/views) folder, and render the page by defining a route for it inside [routes.js](https://github.com/booleanhunter/ReactJS-AdminLTE/blob/master/routes.js).
64+
- Create the entry point that renders the components inside [/src/pages](https://github.com/booleanhunter/ReactJS-AdminLTE/tree/master/src/pages) folder. Now you can begin writing your components and testing them!
65+
- To view and test your components on the page, add your entry point in [webpack.config.js](https://github.com/booleanhunter/ReactJS-AdminLTE/blob/master/webpack.config.js). Run `webpack -p` to generate the bundle for the page, and include the bundle and associated vendors for it in the page using `script` tags.
66+
- `webpack-dev-server` along with React Hot Loader can be used to ease your development workflow. This can be done by installing dev dependencies from `package.json` file. If you haven't, then run `npm install webpack-dev-server` and `npm install react-hot-loader`. Then in your HTML, change your javascript bundles' source paths to point to the webpack-dev-server proxy in your `script` tags. So if you have these bundles for example,
6267

6368
```html
6469
<script src="/dist/js/vendors.js"></script>
@@ -72,12 +77,17 @@ change this to
7277
<script src="http://localhost:8080/dist/js/app.bundle.js"></script>
7378
```
7479

80+
Then you can run `webpack-dev-server --hot --inline` just once - and every time you make any edits to your code and save it, the server will automatically create bundles and update the changes in the browser. This is highly recommended instead of running `webpack -p` every time you make some edit in your code. You can later change the `script` tags back once you stop `webpack-dev-server`.
81+
7582
For a detailed explanation on setting up a workflow using Webpack, check out my blog post - [Webpack for The Fast and The Furious](https://medium.com/@booleanhunter/webpack-for-the-fast-and-the-furious-bf8d3746adbd#.uzx2l0hy4) :oncoming_police_car:
7683

77-
This is still a work in progress and will get better over time. Will try and think of more essential features.
84+
This is still a work in progress and will get better over time.
85+
86+
#### Step 3: Including your new components in the library
87+
After you've finished writing a component and testing it out, you can include it in the library.
88+
- Place/move your component inside the [/src/components](https://github.com/booleanhunter/ReactJS-AdminLTE/tree/master/src) folder and include it inside `widgets.src.js`.
89+
- Run `npm build` to generate the library `reactjsAdminlte.js`. Your component will be included in the library!
90+
- To make sure that your component works correctly, test it out by including it in the page using the library.
7891

79-
#### Upcoming stuff
8092

81-
- Re-usable chart components
82-
- Command line options to choose between client-side rendering and server-side rendering in ReactJS
83-
- Including D3 / C3 charts
93+
##### If you have any further queries that you may have on how to contribute, or you have just general questions about how to use the components in your app - feel free to shoot an email. I'll help you out! :smile_cat:

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"webpack-dev-server": "~1.14.1"
4141
},
4242
"scripts": {
43-
"test": "mocha test -u bdd -R spec"
43+
"test": "mocha test -u bdd -R spec",
44+
"build": "webpack -p --config ./webpack.production.config.js"
4445
}
4546
}

public/dist/js/buttons.bundle.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

public/dist/js/buttons.bundle.js.map

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

public/dist/js/chartVendors.bundle.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/dist/js/dashboardV1.bundle.js

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/dist/js/dashboardV1.bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/dist/js/generalUIElements.bundle.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/dist/js/generalUIElements.bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/dist/js/timeline.bundle.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/dist/js/timeline.bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/dist/js/vendors.js

Lines changed: 11 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/dist/js/vendors.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/dist/js/widgets.bundle.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

routes.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,21 @@ function initialize(app){
88
res.render('dashboard.html');
99
});
1010

11-
app.get('/starter.html', function(req, res){
12-
res.render('starter.html');
13-
});
11+
//Routes for rendering original adminlte pages
1412

15-
app.get('/index.html', function(req, res){
16-
res.render('index.html');
13+
app.get('/adminlte/index.html', function(req, res){
14+
res.render('adminlte-pages/index.html');
1715
});
1816

19-
app.get('/index2.html', function(req, res){
20-
res.render('index2.html');
17+
app.get('/adminlte/index2.html', function(req, res){
18+
res.render('adminlte-pages/index2.html');
2119
});
2220

21+
22+
/*Routes for rendering pages in reactjs.
23+
After creating a page in react, define a route for it here
24+
*/
25+
2326
app.get('/widgets.html', function(req, res){
2427
res.render('widgets.html');
2528
});

src/pages/buttons/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)