diff --git a/.blade.yml b/.blade.yml deleted file mode 100644 index 653cf2f0c..000000000 --- a/.blade.yml +++ /dev/null @@ -1,18 +0,0 @@ -load_paths: - - src - - test/src - - test/vendor - -logical_paths: - - replicant.js - - test.js - - test.css - -build: - logical_paths: - - turbolinks.js - path: dist - js_compressor: uglifier - -require: - - sprockets/export diff --git a/.gitignore b/.gitignore index ab9822168..e6a926968 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -/tmp - +/dist +/node_modules +*.log diff --git a/.npmignore b/.npmignore new file mode 100644 index 000000000..16e470097 --- /dev/null +++ b/.npmignore @@ -0,0 +1 @@ +dist/tests/ diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index 3f684d2d9..000000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.3.4 diff --git a/.travis.yml b/.travis.yml index 9a3b2359a..e45a2b266 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,11 @@ dist: trusty sudo: false cache: -- bundler - yarn -script: bin/ci +before_script: +- yarn install +- yarn build +script: yarn test addons: apt: sources: diff --git a/test/.vscode/launch.json b/.vscode/launch.json similarity index 56% rename from test/.vscode/launch.json rename to .vscode/launch.json index e2a986968..e710bda63 100644 --- a/test/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,10 +1,13 @@ { + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", - "name": "Run All Tests", + "name": "Turbolinks: Debug browser tests", "cwd": "${workspaceFolder}", "port": 9229, "outputCapture": "std", diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000..75e1c77c9 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,36 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Turbolinks: Build dist directory", + "type": "shell", + "command": "yarn build", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [ + "$tsc" + ] + }, + { + "label": "Turbolinks: Run tests", + "type": "shell", + "dependsOn": "Turbolinks: Build dist directory", + "command": "yarn test", + "group": { + "kind": "test", + "isDefault": true + } + }, + { + "label": "Turbolinks: Start dev server", + "type": "shell", + "dependsOn": "Turbolinks: Build dist directory", + "command": "yarn start", + "problemMatcher": [] + } + ] +} diff --git a/Gemfile b/Gemfile deleted file mode 100644 index bd26dacac..000000000 --- a/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source 'https://rubygems.org' - -gem 'rake' -gem 'sprockets' -gem 'sprockets-export' -gem 'coffee-script' -gem 'coffee-script-source', '~> 1.9.1' -gem 'eco' -gem 'uglifier' - -gem 'blade', '~> 0.7.1' diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 26e3b0594..000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,101 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - activesupport (5.1.4) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (~> 0.7) - minitest (~> 5.1) - tzinfo (~> 1.1) - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) - blade (0.7.1) - activesupport (>= 3.0.0) - blade-qunit_adapter (~> 2.0.1) - coffee-script - coffee-script-source - curses (~> 1.0.0) - eventmachine - faye - sprockets (>= 3.0) - thin (>= 1.6.0) - thor (>= 0.19.1) - useragent (~> 0.16.7) - blade-qunit_adapter (2.0.1) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.9.3) - concurrent-ruby (1.0.2) - cookiejar (0.3.3) - curses (1.0.2) - daemons (1.2.6) - eco (1.0.0) - coffee-script - eco-source - execjs - eco-source (1.1.0.rc.1) - em-http-request (1.1.5) - addressable (>= 2.3.4) - cookiejar (!= 0.3.1) - em-socksify (>= 0.3) - eventmachine (>= 1.0.3) - http_parser.rb (>= 0.6.0) - em-socksify (0.3.2) - eventmachine (>= 1.0.0.beta.4) - eventmachine (1.2.5) - execjs (2.6.0) - faye (1.2.4) - cookiejar (>= 0.3.0) - em-http-request (>= 0.3.0) - eventmachine (>= 0.12.0) - faye-websocket (>= 0.9.1) - multi_json (>= 1.0.0) - rack (>= 1.0.0) - websocket-driver (>= 0.5.1) - faye-websocket (0.10.7) - eventmachine (>= 0.12.0) - websocket-driver (>= 0.5.1) - http_parser.rb (0.6.0) - i18n (0.9.1) - concurrent-ruby (~> 1.0) - json (1.8.3) - minitest (5.11.1) - multi_json (1.12.2) - public_suffix (3.0.1) - rack (1.6.4) - rake (10.4.2) - sprockets (3.6.0) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-export (1.0.0) - thin (1.7.2) - daemons (~> 1.0, >= 1.0.9) - eventmachine (~> 1.0, >= 1.0.4) - rack (>= 1, < 3) - thor (0.20.0) - thread_safe (0.3.6) - tzinfo (1.2.4) - thread_safe (~> 0.1) - uglifier (2.7.2) - execjs (>= 0.3.0) - json (>= 1.8.0) - useragent (0.16.8) - websocket-driver (0.7.0) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.3) - -PLATFORMS - ruby - -DEPENDENCIES - blade (~> 0.7.1) - coffee-script - coffee-script-source (~> 1.9.1) - eco - rake - sprockets - sprockets-export - uglifier - -BUNDLED WITH - 1.16.1 diff --git a/LICENSE b/LICENSE deleted file mode 100644 index aa3fd084f..000000000 --- a/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2018 Basecamp, LLC - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 8df598ed7..57456cc4e 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,6 @@ Turbolinks works in all modern desktop and mobile browsers. It depends on the [H ## Installation -Include [`dist/turbolinks.js`](dist/turbolinks.js) in your application’s JavaScript bundle. - Turbolinks automatically initializes itself when loaded via a standalone `