Skip to content

breaking(core): migrate to svelte-kit + revamp ui #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
.github
node_modules
public
node_modules
node_modules/@sapper
src/routes/_layout.svelte
src/data-es.js
data.js
data-es.js
data
api
cover
build
.svelte-kit
coverage
20 changes: 20 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
plugins: ['svelte3', '@typescript-eslint'],
ignorePatterns: ['*.cjs'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
'svelte3/typescript': () => require('typescript')
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020
},
env: {
browser: true,
es2017: true,
node: true
}
};
27 changes: 0 additions & 27 deletions .eslintrc.js

This file was deleted.

47 changes: 16 additions & 31 deletions .github/workflows/build-ui-netlify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
branches:
- master
paths-ignore:
- "LAST_UPDATED"
- "data.json"
- "data.js"
- "data-es.js"
- "tags.txt"
- "tags-prefix.txt"
- "_redirect-out"
- "package.json"
- 'LAST_UPDATED'
- 'data.json'
- 'data.js'
- 'data-es.js'
- 'tags.txt'
- 'tags-prefix.txt'
- '_redirect-out'
- 'package.json'

jobs:
install-deps:
Expand All @@ -25,16 +25,13 @@ jobs:
- name: Setup Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: "14.x"
node-version: '14.x'

- name: Install locked dependencies
run: yarn install --frozen-lockfile

- name: Generate file json
run: yarn toJson

- name: Update export script on package.json
run: yarn toTags
run: yarn script:toJson

- name: Modify last update
run: |
Expand All @@ -45,7 +42,7 @@ jobs:
uses: actions/cache@v1
id: cache-deps
with:
path: "."
path: '.'
key: ${{ github.sha }}

build_ui:
Expand All @@ -58,27 +55,22 @@ jobs:
uses: actions/cache@v1
id: restore-deps
with:
path: "."
path: '.'
key: ${{ github.sha }}

- name: Setup Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: "14.x"
node-version: '14.x'

- name: Perform export to static
run: yarn export

- name: Modify last update on sapper
run: |
d=`date '+%Y-%m-%dT%H:%M:%SZ'`
echo $d > __sapper__/export/LAST_UPDATED
run: yarn build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3.7.3
with:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
publish_dir: ./__sapper__/export
publish_dir: ./build
publish_branch: netlify-pages
full_commit_message: ${{ github.event.head_commit.message }}
force_orphan: true
Expand All @@ -93,7 +85,7 @@ jobs:
uses: actions/cache@v1
id: restore-deps
with:
path: "."
path: '.'
key: ${{ github.sha }}

- name: Deploy
Expand All @@ -102,10 +94,3 @@ jobs:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
publish_dir: ./api
publish_branch: api

# - name: Perform push JSON data to master
# uses: ad-m/github-push-action@v0.6.0
# with:
# github_token: '${{ secrets.PERSONAL_TOKEN }}'
# force: true

68 changes: 34 additions & 34 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
name: 'CodeQL'

on:
pull_request:
Expand All @@ -27,43 +27,43 @@ jobs:
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
27 changes: 11 additions & 16 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: "14.x"
node-version: '14.x'

- name: Install locked dependencies
run: yarn install --frozen-lockfile
Expand All @@ -25,7 +25,7 @@ jobs:
uses: actions/cache@v1
id: cache-deps
with:
path: "."
path: '.'
key: ${{ github.sha }}

lint:
Expand All @@ -38,16 +38,16 @@ jobs:
uses: actions/cache@v1
id: restore-deps
with:
path: "."
path: '.'
key: ${{ github.sha }}

- name: Setup Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: "14.x"
node-version: '14.x'

- name: Lint files
run: yarn run lint
run: yarn run lint:ci
env:
CI: true

Expand All @@ -61,13 +61,13 @@ jobs:
uses: actions/cache@v1
id: restore-deps
with:
path: "."
path: '.'
key: ${{ github.sha }}

- name: Setup Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: "14.x"
node-version: '14.x'

- name: Perform build checking
run: yarn run build
Expand All @@ -84,20 +84,15 @@ jobs:
uses: actions/cache@v1
id: restore-deps
with:
path: "."
path: '.'
key: ${{ github.sha }}

- name: Setup Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: "14.x"
node-version: '14.x'

- name: Perform script toJson checking
run: yarn run toJson
- name: Perform checking script:toJson
run: yarn run script:toJson
env:
CI: true

- name: Perform script toTags checking
run: yarn run toTags
env:
CI: true
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,12 @@ __sapper__/
api/data.js
api/data-es.js
api/data.json

/build
/.svelte-kit
/package
.env
.env.*
!.env.example
.vercel
.output
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
data
api
cover
build
.svelte-kit
coverage
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Belajar daring bersama PHPID

![PHPID](https://img.shields.io/badge/PHPID-Community-blue?cacheSeconds=604800) ![Contribution](https://img.shields.io/badge/Contributions-Welcome-BrightGreen.svg?cacheSeconds=604800) [![Build UI for Netlify](https://github.com/phpid-jakarta/phpid-learning/actions/workflows/build-ui-netlify.yml/badge.svg)](https://github.com/phpid-jakarta/phpid-learning/actions/workflows/build-ui-netlify.yml)
![PHPID](https://img.shields.io/badge/PHPID-Community-blue?cacheSeconds=604800) ![Contribution](https://img.shields.io/badge/Contributions-Welcome-Brightemerald.svg?cacheSeconds=604800) [![Build UI for Netlify](https://github.com/phpid-jakarta/phpid-learning/actions/workflows/build-ui-netlify.yml/badge.svg)](https://github.com/phpid-jakarta/phpid-learning/actions/workflows/build-ui-netlify.yml)

[![Belajar daring bersama PHPID](static/phpid-learning-logo-small.jpg)](https://s.byphp.id/learning)

Expand Down
Loading