Skip to content

Commit 390f68e

Browse files
authored
Merge pull request #75 from ucfopen/dev/3-nyx
Dev/3 nyx
2 parents 4654d1c + 7491cda commit 390f68e

File tree

167 files changed

+24338
-38
lines changed

Some content is hidden

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

167 files changed

+24338
-38
lines changed

.babelrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"presets": [
3+
"@babel/preset-react",
4+
[
5+
"@babel/preset-env",
6+
{
7+
useBuiltIns: "usage",
8+
corejs: 3,
9+
debug: false, // outputs polyfills and browserlist
10+
// targets: 'defaults' // allows .browserslistrc to work
11+
},
12+
]
13+
],
14+
"plugins": [
15+
["@babel/transform-runtime"],
16+
["babel-plugin-react-docgen"] // needed for storybooks to pick up react prop types
17+
]
18+
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ internal/templates/compiled/
4545
internal/DELETEME/tests/*
4646

4747
/*.json
48+
!package.json
49+
!/internal/src/*.json
4850

4951
# ignore smarty template complied directory
5052
internal/templates/compiled/*
@@ -54,3 +56,4 @@ internal/vendor/
5456
internal/wordpress-core/
5557
wp/*
5658

59+
node_modules

.storybook/main.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const custom = require('../internal/src/webpack.config.js')(null, {})
2+
3+
module.exports = {
4+
stories: ['../internal/src/**/*.stories.mdx', '../internal/src/**/*.stories.@(js|jsx|ts|tsx)'],
5+
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
6+
webpackFinal: (config) => {
7+
return {
8+
...config,
9+
module: { ...config.module, rules: custom.module.rules },
10+
plugins: [...config.plugins, ...custom.plugins],
11+
}
12+
},
13+
}

.storybook/preview-head.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<link
2+
href="https://fonts.googleapis.com/css?family=Lato:400,400i,700,700i,900,900i|Roboto+Mono:400,400i,700,700i|Noto+Serif:400,400i,700,700i"
3+
rel="stylesheet"
4+
/>

.storybook/preview.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const parameters = {
2+
actions: { argTypesRegex: '^on[A-Z].*' },
3+
}

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ For local development, testing, and as a reference for the architecture setup, w
77
The docker-compose setup will automatically set up the server containers, seed the database, and get everything up and running.
88

99
1. Install [Docker for Mac/Windows/Linux](https://www.docker.com/products/docker)
10-
2. Install PHP Composer via https://getcomposer.org/download
11-
3. Run `composer install` - if you have git permission issues, [configure your github ssh keys](https://help.github.com/articles/generating-an-ssh-key/)
12-
4. Run `docker-compose up`
13-
5. After up finishes, Run `docker-compose run --rm phpfpm php internal/update_password.php obojobo_admin` to generate the obojobo_admin user's password
10+
2. Run `docker-compose up -d` (-d makes it run in the background eg: daemonized). this will take a while the first time.
11+
3. After 2 finishes: Run `docker-compose run --rm phpfpm composer install` to install wordpress and all the php vendor libraries.
12+
4. After 3 finishes: Run `docker-compose run --rm phpfpm php internal/update_password.php obojobo_admin rocketduck` to set the obojobo_admin user's password.
13+
5. Log in either at `http://127.0.0.1/repository` or `http://127.0.0.1/wp/wp-admin`
14+
15+
## React Repository AND Docker
16+
17+
Docker isn't needed to work with storybook components, just use `yarn storybook` for that. To allow react to talk to the server, you'll need to run webpack-dev-server and the docker servers together.
18+
19+
That means you need to have BOTH the docker servers running (`docker-compose up -d` shown above) AND the webpack dev server (`yarn dev`). Using this combo requires the obojobo config for APP_URL be set to the url that webpack-dev-server creates, that value is hardcoded (due to php class const) in cfgLocal.docker.php. The url you should use is whatever webpack-dev-server announces when it starts running, usually `https:/127.0.0.1:8080`
1420

1521

1622
# Requirements

assets/dist/manifest.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"repository.css": "/assets/dist/repository-499b10e424ebd7b6c1ce.min.css",
3+
"repository.js": "/assets/dist/repository-08896ea37a06601c7a7a.min.js"
4+
}

assets/dist/repository-08896ea37a06601c7a7a.min.js

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

assets/dist/repository-499b10e424ebd7b6c1ce.min.css

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

assets/images/user-circle.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)