diff --git a/bin/build.sh b/bin/build.sh index 0275886..66e508c 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -11,10 +11,10 @@ popup=dist/chrome/js/popup.js background=dist/chrome/js/background.js supporters=dist/chrome/js/supporters.js -rollup src/options.js --file $options -rollup src/popup.js --file $popup -rollup src/background.js --file $background -rollup src/supporters.js --file $supporters +rollup src/js/options.js --file $options +rollup src/js/popup.js --file $popup +rollup src/js/background.js --file $background +rollup src/js/supporters.js --file $supporters \cp -f $options dist/firefox/js/options.js \cp -f $popup dist/firefox/js/popup.js @@ -26,9 +26,9 @@ jq -s '.[0] * .[1]' manifest.json manifest_firefox.json > dist/firefox/manifest. for brw in `ls dist` do - \cp src/content.js dist/$brw/js/ - \cp src/attach_target.js dist/$brw/js/ - \cp -r *.html dist/$brw/ + \cp src/js/content.js dist/$brw/js/ + \cp src/js/attach_target.js dist/$brw/js/ + \cp -r src/*.html dist/$brw/ \cp -r icons dist/$brw/ done echo "build done" diff --git a/package.json b/package.json index 8877a4d..3bbc6ed 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "scripts": { "archive": "npm run build; ./bin/archive.sh", "build": "./bin/build.sh", - "test": "mocha --timeout 10000 test/lib/*.test.js", + "test": "mocha --timeout 10000 src/js/**/*.test.js", "test_ci": "", "coverage": "codecov" }, diff --git a/credits.html b/src/credits.html similarity index 100% rename from credits.html rename to src/credits.html diff --git a/src/attach_target.js b/src/js/attach_target.js similarity index 100% rename from src/attach_target.js rename to src/js/attach_target.js diff --git a/src/background.js b/src/js/background.js similarity index 100% rename from src/background.js rename to src/js/background.js diff --git a/src/content.js b/src/js/content.js similarity index 100% rename from src/content.js rename to src/js/content.js diff --git a/src/lib/auto_assume_last_role.js b/src/js/lib/auto_assume_last_role.js similarity index 100% rename from src/lib/auto_assume_last_role.js rename to src/js/lib/auto_assume_last_role.js diff --git a/src/lib/color_picker.js b/src/js/lib/color_picker.js similarity index 100% rename from src/lib/color_picker.js rename to src/js/lib/color_picker.js diff --git a/src/lib/content.js b/src/js/lib/content.js similarity index 100% rename from src/lib/content.js rename to src/js/lib/content.js diff --git a/src/lib/create_role_list_item.js b/src/js/lib/create_role_list_item.js similarity index 100% rename from src/lib/create_role_list_item.js rename to src/js/lib/create_role_list_item.js diff --git a/test/lib/create_role_list_item.test.js b/src/js/lib/create_role_list_item.test.js similarity index 98% rename from test/lib/create_role_list_item.test.js rename to src/js/lib/create_role_list_item.test.js index d4f3a08..62ab5cb 100644 --- a/test/lib/create_role_list_item.test.js +++ b/src/js/lib/create_role_list_item.test.js @@ -1,6 +1,6 @@ import { expect } from 'chai'; import { JSDOM } from 'jsdom'; -import { createRoleListItem } from '../../src/lib/create_role_list_item.js'; +import { createRoleListItem } from './create_role_list_item.js'; describe('createRoleListItem', () => { let window; diff --git a/src/lib/data_profiles_splitter.js b/src/js/lib/data_profiles_splitter.js similarity index 100% rename from src/lib/data_profiles_splitter.js rename to src/js/lib/data_profiles_splitter.js diff --git a/test/lib/data_profiles_splitter.test.js b/src/js/lib/data_profiles_splitter.test.js similarity index 98% rename from test/lib/data_profiles_splitter.test.js rename to src/js/lib/data_profiles_splitter.test.js index 76be383..b44cddc 100644 --- a/test/lib/data_profiles_splitter.test.js +++ b/src/js/lib/data_profiles_splitter.test.js @@ -1,5 +1,5 @@ import { expect } from 'chai' -import { DataProfilesSplitter } from '../../src/lib/data_profiles_splitter.js' +import { DataProfilesSplitter } from './data_profiles_splitter.js' describe('DataProfilesSplitter', () => { const dps = new DataProfilesSplitter(); diff --git a/src/lib/load_aws_config.js b/src/js/lib/load_aws_config.js similarity index 100% rename from src/lib/load_aws_config.js rename to src/js/lib/load_aws_config.js diff --git a/test/lib/load_aws_config.test.js b/src/js/lib/load_aws_config.test.js similarity index 98% rename from test/lib/load_aws_config.test.js rename to src/js/lib/load_aws_config.test.js index f54ae86..d1a2380 100644 --- a/test/lib/load_aws_config.test.js +++ b/src/js/lib/load_aws_config.test.js @@ -1,5 +1,5 @@ import { expect } from 'chai' -import { loadAwsConfig } from '../../src/lib/load_aws_config.js' +import { loadAwsConfig } from './load_aws_config.js' describe('loadAwsConfig', () => { describe('Simple Configuration', () => { diff --git a/src/lib/lz-string.min.js b/src/js/lib/lz-string.min.js similarity index 100% rename from src/lib/lz-string.min.js rename to src/js/lib/lz-string.min.js diff --git a/src/lib/profile_set.js b/src/js/lib/profile_set.js similarity index 100% rename from src/lib/profile_set.js rename to src/js/lib/profile_set.js diff --git a/test/lib/profile_set.test.js b/src/js/lib/profile_set.test.js similarity index 99% rename from test/lib/profile_set.test.js rename to src/js/lib/profile_set.test.js index 97710a2..06be999 100644 --- a/test/lib/profile_set.test.js +++ b/src/js/lib/profile_set.test.js @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { createProfileSet } from '../../src/lib/profile_set.js'; +import { createProfileSet } from './profile_set.js'; describe('createProfileSet', () => { describe('when userInfo is on logged-in', () => { diff --git a/src/lib/set_icon.js b/src/js/lib/set_icon.js similarity index 100% rename from src/lib/set_icon.js rename to src/js/lib/set_icon.js diff --git a/src/lib/storage_repository.js b/src/js/lib/storage_repository.js similarity index 100% rename from src/lib/storage_repository.js rename to src/js/lib/storage_repository.js diff --git a/src/lib/verify_jwt.js b/src/js/lib/verify_jwt.js similarity index 100% rename from src/lib/verify_jwt.js rename to src/js/lib/verify_jwt.js diff --git a/src/options.js b/src/js/options.js similarity index 100% rename from src/options.js rename to src/js/options.js diff --git a/src/popup.js b/src/js/popup.js similarity index 100% rename from src/popup.js rename to src/js/popup.js diff --git a/src/supporters.js b/src/js/supporters.js similarity index 100% rename from src/supporters.js rename to src/js/supporters.js diff --git a/options.html b/src/options.html similarity index 100% rename from options.html rename to src/options.html diff --git a/popup.html b/src/popup.html similarity index 100% rename from popup.html rename to src/popup.html diff --git a/supporters.html b/src/supporters.html similarity index 100% rename from supporters.html rename to src/supporters.html diff --git a/updated.html b/src/updated.html similarity index 100% rename from updated.html rename to src/updated.html