From b59f0edf6ed8185142eebe8419068685a87a4270 Mon Sep 17 00:00:00 2001 From: Marine Dunstetter Date: Tue, 7 Mar 2023 15:48:13 +0100 Subject: [PATCH] rename addon folder, refactor scripts, build the addon on CI --- .github/workflows/ci.yml | 10 ++++++---- {addon => ember-slugify}/.eslintignore | 0 {addon => ember-slugify}/.eslintrc.js | 0 {addon => ember-slugify}/.gitignore | 0 {addon => ember-slugify}/.prettierignore | 0 {addon => ember-slugify}/.prettierrc.js | 0 {addon => ember-slugify}/.template-lintrc.js | 0 {addon => ember-slugify}/addon-main.js | 0 {addon => ember-slugify}/babel.config.json | 0 {addon => ember-slugify}/config/environment.js | 0 {addon => ember-slugify}/package.json | 0 {addon => ember-slugify}/rollup.config.mjs | 0 .../src/helpers/remove-diacritics.js | 0 {addon => ember-slugify}/src/helpers/slugify.js | 0 {addon => ember-slugify}/src/index.js | 0 package.json | 10 +++++++++- test-app/package.json | 2 +- 17 files changed, 16 insertions(+), 6 deletions(-) rename {addon => ember-slugify}/.eslintignore (100%) rename {addon => ember-slugify}/.eslintrc.js (100%) rename {addon => ember-slugify}/.gitignore (100%) rename {addon => ember-slugify}/.prettierignore (100%) rename {addon => ember-slugify}/.prettierrc.js (100%) rename {addon => ember-slugify}/.template-lintrc.js (100%) rename {addon => ember-slugify}/addon-main.js (100%) rename {addon => ember-slugify}/babel.config.json (100%) rename {addon => ember-slugify}/config/environment.js (100%) rename {addon => ember-slugify}/package.json (100%) rename {addon => ember-slugify}/rollup.config.mjs (100%) rename {addon => ember-slugify}/src/helpers/remove-diacritics.js (100%) rename {addon => ember-slugify}/src/helpers/slugify.js (100%) rename {addon => ember-slugify}/src/index.js (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27c8faa..f1bd1b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,17 +31,19 @@ jobs: - name: Install Dependencies run: yarn install --frozen-lockfile - - name: Run Lint Addon + - name: Lint Addon run: yarn lint working-directory: addon - - name: Run Lint Test App + - name: Lint Test App run: yarn lint working-directory: test-app + - name: Build Addon + run: yarn build + - name: Run Tests - run: yarn test:ember - working-directory: test-app + run: yarn test floating: name: Floating Dependencies diff --git a/addon/.eslintignore b/ember-slugify/.eslintignore similarity index 100% rename from addon/.eslintignore rename to ember-slugify/.eslintignore diff --git a/addon/.eslintrc.js b/ember-slugify/.eslintrc.js similarity index 100% rename from addon/.eslintrc.js rename to ember-slugify/.eslintrc.js diff --git a/addon/.gitignore b/ember-slugify/.gitignore similarity index 100% rename from addon/.gitignore rename to ember-slugify/.gitignore diff --git a/addon/.prettierignore b/ember-slugify/.prettierignore similarity index 100% rename from addon/.prettierignore rename to ember-slugify/.prettierignore diff --git a/addon/.prettierrc.js b/ember-slugify/.prettierrc.js similarity index 100% rename from addon/.prettierrc.js rename to ember-slugify/.prettierrc.js diff --git a/addon/.template-lintrc.js b/ember-slugify/.template-lintrc.js similarity index 100% rename from addon/.template-lintrc.js rename to ember-slugify/.template-lintrc.js diff --git a/addon/addon-main.js b/ember-slugify/addon-main.js similarity index 100% rename from addon/addon-main.js rename to ember-slugify/addon-main.js diff --git a/addon/babel.config.json b/ember-slugify/babel.config.json similarity index 100% rename from addon/babel.config.json rename to ember-slugify/babel.config.json diff --git a/addon/config/environment.js b/ember-slugify/config/environment.js similarity index 100% rename from addon/config/environment.js rename to ember-slugify/config/environment.js diff --git a/addon/package.json b/ember-slugify/package.json similarity index 100% rename from addon/package.json rename to ember-slugify/package.json diff --git a/addon/rollup.config.mjs b/ember-slugify/rollup.config.mjs similarity index 100% rename from addon/rollup.config.mjs rename to ember-slugify/rollup.config.mjs diff --git a/addon/src/helpers/remove-diacritics.js b/ember-slugify/src/helpers/remove-diacritics.js similarity index 100% rename from addon/src/helpers/remove-diacritics.js rename to ember-slugify/src/helpers/remove-diacritics.js diff --git a/addon/src/helpers/slugify.js b/ember-slugify/src/helpers/slugify.js similarity index 100% rename from addon/src/helpers/slugify.js rename to ember-slugify/src/helpers/slugify.js diff --git a/addon/src/index.js b/ember-slugify/src/index.js similarity index 100% rename from addon/src/index.js rename to ember-slugify/src/index.js diff --git a/package.json b/package.json index f2eef96..8e056e7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,15 @@ { "private": true, - "workspaces": ["addon", "test-app"], + "workspaces": ["ember-slugify", "test-app"], "resolutions": { "clean-css": "4.2.1" + }, + "scripts": { + "build": "yarn workspace ember-slugify run build", + "lint": "yarn workspaces run lint", + "lint:fix": "yarn workspaces run lint:fix", + "start:addon": "yarn workspace ember-slugify run start", + "start:test-app": "yarn workspace test-app run start", + "test": "yarn workspace test-app test" } } \ No newline at end of file diff --git a/test-app/package.json b/test-app/package.json index 030588e..832bd04 100644 --- a/test-app/package.json +++ b/test-app/package.json @@ -36,7 +36,7 @@ "lint:js": "eslint . --cache", "lint:js:fix": "eslint . --fix", "start": "ember serve", - "test": "npm-run-all --print-name \"lint\" \"test:*\"", + "test": "npm-run-all --print-name \"test:*\"", "test:ember": "ember test", "test:ember-compatibility": "ember try:each" },