Skip to content

Commit 1c24eb3

Browse files
committed
feat: add example-blog
1 parent 41efa9c commit 1c24eb3

Some content is hidden

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

72 files changed

+25430
-4
lines changed

.editorconfig

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_size = 2
8+
indent_style = space
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true

.eslintignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist/*
2+
.cache
3+
public
4+
node_modules
5+
*.esm.js

.eslintrc.js

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
module.exports = {
2+
parser: "babel-eslint",
3+
extends: [
4+
"eslint:recommended",
5+
"plugin:react/recommended",
6+
"plugin:prettier/recommended",
7+
"plugin:mdx/recommended",
8+
"plugin:cypress/recommended",
9+
],
10+
parserOptions: {
11+
ecmaVersion: 2020,
12+
sourceType: "module",
13+
ecmaFeatures: {
14+
jsx: true,
15+
},
16+
},
17+
env: {
18+
browser: true,
19+
es6: true,
20+
node: true,
21+
jest: true,
22+
},
23+
rules: {
24+
"react/prop-types": 0,
25+
"prettier/prettier": ["error"],
26+
"react/display-name": "off",
27+
"react/react-in-jsx-scope": "off",
28+
"import/export": 0,
29+
},
30+
settings: {
31+
react: {
32+
version: "detect",
33+
},
34+
},
35+
overrides: [
36+
{
37+
files: ["*.ts", "*.tsx"],
38+
parser: "@typescript-eslint/parser",
39+
plugins: ["@typescript-eslint/eslint-plugin"],
40+
extends: [
41+
"plugin:@typescript-eslint/eslint-recommended",
42+
"plugin:@typescript-eslint/recommended",
43+
],
44+
rules: {
45+
"@typescript-eslint/explicit-module-boundary-types": "off",
46+
"@typescript-eslint/no-namespace": "off",
47+
"@typescript-eslint/explicit-function-return-type": "off",
48+
"@typescript-eslint/no-empty-interface": "off",
49+
"@typescript-eslint/member-delimiter-style": [
50+
"error",
51+
{
52+
multiline: {
53+
delimiter: "none",
54+
},
55+
},
56+
],
57+
},
58+
},
59+
],
60+
}

.gitignore

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Runtime data
10+
pids
11+
*.pid
12+
*.seed
13+
*.pid.lock
14+
15+
# Directory for instrumented libs generated by jscoverage/JSCover
16+
lib-cov
17+
18+
# Coverage directory used by tools like istanbul
19+
coverage
20+
21+
# nyc test coverage
22+
.nyc_output
23+
24+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
25+
.grunt
26+
27+
# Bower dependency directory (https://bower.io/)
28+
bower_components
29+
30+
# node-waf configuration
31+
.lock-wscript
32+
33+
# Compiled binary addons (http://nodejs.org/api/addons.html)
34+
build/Release
35+
36+
# Dependency directories
37+
node_modules/
38+
jspm_packages/
39+
40+
# Typescript v1 declaration files
41+
typings/
42+
43+
# Optional npm cache directory
44+
.npm
45+
46+
# Optional eslint cache
47+
.eslintcache
48+
49+
# Optional REPL history
50+
.node_repl_history
51+
52+
# Output of 'npm pack'
53+
*.tgz
54+
55+
# dotenv environment variables file
56+
.env
57+
58+
# gatsby files
59+
.cache/
60+
public
61+
62+
!sites/www-next/public
63+
!starters/nextjs-starter/public
64+
65+
# Mac files
66+
.DS_Store
67+
68+
# Yarn
69+
yarn-error.log
70+
.pnp/
71+
.pnp.js
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
.yarn
75+
76+
.netlify/
77+
78+
# Editors
79+
.vscode/*
80+
!.vscode/tasks.json
81+
!.vscode/launch.json
82+
!.vscode/extensions.json
83+
84+
# NPM lock files
85+
package-lock.json
86+
87+
# Cypress
88+
cypress/screenshots
89+
90+
# Other
91+
*__clone*
92+
dist

.prettierignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cache
2+
.cache
3+
package.json
4+
package-lock.json
5+
public
6+
CHANGELOG.md
7+
.yarn
8+
packages/codemod/transforms/__testfixtures__/**/*
9+
packages/codemod/transforms/__tests__/**/*
10+
packages/codemod/**/*.js
11+
packages/codemod/**/*.d.ts
12+
dist
13+
.next

.prettierrc.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
endOfLine: "lf",
3+
semi: false,
4+
singleQuote: false,
5+
tabWidth: 2,
6+
trailingComma: "es5",
7+
}

babel.config.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
presets: ["@babel/env", "@babel/react"],
3+
env: {
4+
test: {
5+
plugins: ["@babel/plugin-transform-runtime"],
6+
},
7+
},
8+
}

examples/README.md

Whitespace-only changes.

examples/drupal-site/.env.example

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#
2+
# Copy and rename this file to .env at root of this project.
3+
#
4+
5+
# A common use case is to supply database creds via the environment. Edit settings.php
6+
# like so:
7+
#
8+
# $databases['default']['default'] = [
9+
# 'database' => getenv('MYSQL_DATABASE'),
10+
# 'driver' => 'mysql',
11+
# 'host' => getenv('MYSQL_HOSTNAME'),
12+
# 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
13+
# 'password' => getenv('MYSQL_PASSWORD'),
14+
# 'port' => getenv('MYSQL_PORT'),
15+
# 'prefix' => '',
16+
# 'username' => getenv('MYSQL_USER'),
17+
# ];
18+
#
19+
# Uncomment and populate as needed.
20+
# MYSQL_DATABASE=
21+
# MYSQL_HOSTNAME=
22+
# MYSQL_PASSWORD=
23+
# MYSQL_PORT=
24+
# MYSQL_USER=
25+
26+
# Another common use case is to set Drush's --uri via environment.
27+
# DRUSH_OPTIONS_URI=http://example.com

examples/drupal-site/.gitignore

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Ignore directories generated by Composer
2+
/drush/contrib/
3+
/vendor/
4+
/web/core/
5+
/web/modules/contrib/
6+
/web/themes/contrib/
7+
/web/profiles/contrib/
8+
/web/libraries/
9+
10+
# Ignore sensitive information
11+
/web/sites/*/settings.php
12+
/web/sites/*/settings.local.php
13+
14+
# Ignore Drupal's file directory
15+
/web/sites/*/files/
16+
17+
# Ignore SimpleTest multi-site environment.
18+
/web/sites/simpletest
19+
20+
# Ignore files generated by PhpStorm
21+
/.idea/
22+
23+
# Ignore .env files as they are personal
24+
/.env
25+
/.editorconfig
26+
/.gitattributes
27+
28+
/oauth-keys/*.key

examples/drupal-site/.travis.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
language: php
2+
dist: trusty
3+
sudo: false
4+
5+
php:
6+
- 7.0
7+
- 7.1
8+
- 7.2
9+
- 7.3
10+
11+
env:
12+
global:
13+
- SIMPLETEST_DB=sqlite://tmp/site.sqlite
14+
- SIMPLETEST_BASE_URL="http://127.0.0.1:8080"
15+
matrix:
16+
- RELEASE=stable COMPOSER_CHANNEL=stable
17+
- RELEASE=dev COMPOSER_CHANNEL=stable
18+
- RELEASE=stable COMPOSER_CHANNEL=snapshot
19+
20+
before_install:
21+
- echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
22+
- phpenv config-rm xdebug.ini
23+
- composer --verbose self-update --$COMPOSER_CHANNEL
24+
- composer --version
25+
26+
install:
27+
- composer --verbose validate
28+
- composer --verbose install
29+
30+
script:
31+
- if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi;
32+
- if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.8.x-dev; composer --verbose require --no-update --dev drupal/core-dev:8.8.x-dev; fi;
33+
- if [[ $RELEASE = dev ]]; then composer --verbose update; fi;
34+
- ./vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite
35+
- ./vendor/bin/drush runserver $SIMPLETEST_BASE_URL &
36+
- until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null
37+
# Run a single unit test to verfiy the testing setup.
38+
- ./vendor/bin/phpunit -c ./web/core ./web/core/modules/system/tests/src/Unit/SystemRequirementsTest.php
39+
- ./vendor/bin/drush
40+
- if [[ $RELEASE = stable ]]; then ./vendor/bin/drupal; fi;

0 commit comments

Comments
 (0)