Angular 1.6.9, remove bower
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -19,8 +19,6 @@
|
|||||||
|
|
||||||
/app/assets/templates/generated/
|
/app/assets/templates/generated/
|
||||||
|
|
||||||
# Ignore bower components
|
|
||||||
/vendor/assets/bower_components/
|
|
||||||
/node_modules
|
/node_modules
|
||||||
/dist/javascripts/app.js
|
/dist/javascripts/app.js
|
||||||
/dist/javascripts/compiled.js
|
/dist/javascripts/compiled.js
|
||||||
|
|||||||
@@ -19,8 +19,6 @@
|
|||||||
|
|
||||||
/app/assets/templates/generated/
|
/app/assets/templates/generated/
|
||||||
|
|
||||||
# Ignore bower components
|
|
||||||
/vendor/assets/bower_components/
|
|
||||||
/node_modules
|
/node_modules
|
||||||
|
|
||||||
/.sass-cache
|
/.sass-cache
|
||||||
|
|||||||
@@ -38,10 +38,6 @@ RUN bundle install
|
|||||||
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
RUN npm install -g bower grunt
|
|
||||||
|
|
||||||
RUN bundle exec rake bower:install
|
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Uncomment the line below for production:
|
# Uncomment the line below for production:
|
||||||
|
|||||||
2
Gemfile
2
Gemfile
@@ -15,8 +15,6 @@ gem 'rack-cors', :require => 'rack/cors'
|
|||||||
|
|
||||||
gem 'dotenv-rails'
|
gem 'dotenv-rails'
|
||||||
|
|
||||||
gem 'bower-rails', '~> 0.10.0'
|
|
||||||
|
|
||||||
# bundle exec rake doc:rails generates the API under doc/api.
|
# bundle exec rake doc:rails generates the API under doc/api.
|
||||||
gem 'sdoc', '~> 0.4.0', group: :doc
|
gem 'sdoc', '~> 0.4.0', group: :doc
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ GEM
|
|||||||
sshkit (>= 1.6.1, != 1.7.0)
|
sshkit (>= 1.6.1, != 1.7.0)
|
||||||
arel (8.0.0)
|
arel (8.0.0)
|
||||||
bindex (0.5.0)
|
bindex (0.5.0)
|
||||||
bower-rails (0.10.0)
|
|
||||||
builder (3.2.3)
|
builder (3.2.3)
|
||||||
byebug (10.0.2)
|
byebug (10.0.2)
|
||||||
capistrano (3.10.2)
|
capistrano (3.10.2)
|
||||||
@@ -193,7 +192,6 @@ PLATFORMS
|
|||||||
x64-mingw32
|
x64-mingw32
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
bower-rails (~> 0.10.0)
|
|
||||||
byebug
|
byebug
|
||||||
capistrano
|
capistrano
|
||||||
capistrano-bundler
|
capistrano-bundler
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ module.exports = function(grunt) {
|
|||||||
src: [
|
src: [
|
||||||
'node_modules/standard-file-js/dist/regenerator.js',
|
'node_modules/standard-file-js/dist/regenerator.js',
|
||||||
'node_modules/standard-file-js/dist/sfjs.js',
|
'node_modules/standard-file-js/dist/sfjs.js',
|
||||||
'vendor/assets/bower_components/angular/angular.js',
|
'node_modules/angular/angular.js',
|
||||||
'vendor/assets/javascripts/angular-sanitize.js',
|
'vendor/assets/javascripts/angular-sanitize.js',
|
||||||
'vendor/assets/javascripts/lodash/lodash.custom.min.js'
|
'vendor/assets/javascripts/lodash/lodash.custom.min.js'
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ angular.module('app')
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.controller('NotesCtrl', function (authManager, $timeout, $rootScope, modelManager,
|
.controller('NotesCtrl', function (authManager, $timeout, $rootScope, modelManager,
|
||||||
storageManager, desktopManager, privilegesManager) {
|
syncManager, storageManager, desktopManager, privilegesManager) {
|
||||||
|
|
||||||
this.panelController = {};
|
this.panelController = {};
|
||||||
this.searchSubmitted = false;
|
this.searchSubmitted = false;
|
||||||
@@ -32,6 +32,15 @@ angular.module('app')
|
|||||||
this.loadPreferences();
|
this.loadPreferences();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
syncManager.addEventHandler((syncEvent, data) => {
|
||||||
|
if(syncEvent == "local-data-loaded") {
|
||||||
|
this.localDataLoaded = true;
|
||||||
|
if(this.tag && this.tag.notes.length == 0) {
|
||||||
|
this.createNewNote();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
modelManager.addItemSyncObserver("note-list", "Note", (allItems, validItems, deletedItems, source, sourceKey) => {
|
modelManager.addItemSyncObserver("note-list", "Note", (allItems, validItems, deletedItems, source, sourceKey) => {
|
||||||
// Note has changed values, reset its flags
|
// Note has changed values, reset its flags
|
||||||
for(var note of allItems) {
|
for(var note of allItems) {
|
||||||
@@ -104,10 +113,18 @@ angular.module('app')
|
|||||||
// When a note is removed from the list
|
// When a note is removed from the list
|
||||||
this.onNoteRemoval = function() {
|
this.onNoteRemoval = function() {
|
||||||
let visibleNotes = this.visibleNotes();
|
let visibleNotes = this.visibleNotes();
|
||||||
|
let index;
|
||||||
if(this.selectedIndex < visibleNotes.length) {
|
if(this.selectedIndex < visibleNotes.length) {
|
||||||
this.selectNote(visibleNotes[Math.max(this.selectedIndex, 0)]);
|
index = Math.max(this.selectedIndex, 0);
|
||||||
} else {
|
} else {
|
||||||
this.selectNote(visibleNotes[visibleNotes.length - 1]);
|
index = visibleNotes.length - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
let note = visibleNotes[index];
|
||||||
|
if(note) {
|
||||||
|
this.selectNote(note);
|
||||||
|
} else {
|
||||||
|
this.createNewNote();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,7 +245,12 @@ angular.module('app')
|
|||||||
|
|
||||||
this.noteFilter.text = "";
|
this.noteFilter.text = "";
|
||||||
|
|
||||||
tag.notes.forEach((note) => { note.visible = true; })
|
if(tag.notes.length > 0) {
|
||||||
|
tag.notes.forEach((note) => { note.visible = true; })
|
||||||
|
this.selectFirstNote();
|
||||||
|
} else if(this.localDataLoaded) {
|
||||||
|
this.createNewNote();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.visibleNotes = function() {
|
this.visibleNotes = function() {
|
||||||
@@ -237,19 +259,15 @@ angular.module('app')
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.selectFirstNote = function(createNew) {
|
this.selectFirstNote = function() {
|
||||||
var visibleNotes = this.visibleNotes();
|
var visibleNotes = this.visibleNotes();
|
||||||
|
|
||||||
if(visibleNotes.length > 0) {
|
if(visibleNotes.length > 0) {
|
||||||
this.selectNote(visibleNotes[0]);
|
this.selectNote(visibleNotes[0]);
|
||||||
} else if(createNew) {
|
|
||||||
this.createNewNote();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.selectNote = async function(note, viaClick = false) {
|
this.selectNote = async function(note, viaClick = false) {
|
||||||
if(!note) {
|
if(!note) {
|
||||||
this.createNewNote();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -347,7 +365,7 @@ angular.module('app')
|
|||||||
|
|
||||||
$timeout(function(){
|
$timeout(function(){
|
||||||
if(!this.selectedNote.visible) {
|
if(!this.selectedNote.visible) {
|
||||||
this.selectFirstNote(false);
|
this.selectFirstNote();
|
||||||
}
|
}
|
||||||
}.bind(this), 100)
|
}.bind(this), 100)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class ModelManager extends SFModelManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
noteCount() {
|
noteCount() {
|
||||||
return this.notes.length;
|
return this.notes.filter((n) => !n.dummy).length;
|
||||||
}
|
}
|
||||||
|
|
||||||
removeAllItemsFromMemory() {
|
removeAllItemsFromMemory() {
|
||||||
|
|||||||
@@ -184,7 +184,7 @@
|
|||||||
#import-password-request{"ng-if" => "importData.requestPassword"}
|
#import-password-request{"ng-if" => "importData.requestPassword"}
|
||||||
%form.sk-panel-form.stretch{"ng-submit" => "submitImportPassword()"}
|
%form.sk-panel-form.stretch{"ng-submit" => "submitImportPassword()"}
|
||||||
%p Enter the account password associated with the import file.
|
%p Enter the account password associated with the import file.
|
||||||
%input.sk-input.mt-5{:type => 'password', "placeholder" => "Enter File Account Password", "ng-model" => "importData.password", "autofocus" => "true"}
|
%input.sk-input.contrast.mt-5{:type => 'password', "placeholder" => "Enter File Account Password", "ng-model" => "importData.password", "autofocus" => "true"}
|
||||||
.sk-button-group.stretch.sk-panel-row.form-submit
|
.sk-button-group.stretch.sk-panel-row.form-submit
|
||||||
%button.sk-button.info{"type" => "submit"}
|
%button.sk-button.info{"type" => "submit"}
|
||||||
.sk-label Decrypt & Import
|
.sk-label Decrypt & Import
|
||||||
|
|||||||
16
bower.json
16
bower.json
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "standard-notes",
|
|
||||||
"lib": {
|
|
||||||
"name": "bower-rails generated lib assets",
|
|
||||||
"dependencies": {}
|
|
||||||
},
|
|
||||||
"vendor": {
|
|
||||||
"name": "bower-rails generated vendor assets",
|
|
||||||
"dependencies": {
|
|
||||||
"angular": "1.6.1"
|
|
||||||
},
|
|
||||||
"resolutions": {
|
|
||||||
"angular": "1.6.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -12,7 +12,6 @@ dependencies:
|
|||||||
override:
|
override:
|
||||||
- bundle install
|
- bundle install
|
||||||
- npm install
|
- npm install
|
||||||
- bundle exec rake bower:install
|
|
||||||
- grunt
|
- grunt
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
|||||||
@@ -54,8 +54,7 @@ namespace :deploy do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
before 'deploy:compile_assets', 'bower:install'
|
before 'deploy:compile_assets', 'deploy:npm_install'
|
||||||
after 'bower:install', 'deploy:npm_install'
|
|
||||||
|
|
||||||
set :ssh_options, {
|
set :ssh_options, {
|
||||||
keys: %W( #{CAP_CONFIG['default']['key_path']} ),
|
keys: %W( #{CAP_CONFIG['default']['key_path']} ),
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
BowerRails.configure do |bower_rails|
|
|
||||||
# Tell bower-rails what path should be considered as root. Defaults to Dir.pwd
|
|
||||||
# bower_rails.root_path = Dir.pwd
|
|
||||||
|
|
||||||
# Invokes rake bower:install before precompilation. Defaults to false
|
|
||||||
# bower_rails.install_before_precompile = true
|
|
||||||
|
|
||||||
# Invokes rake bower:resolve before precompilation. Defaults to false
|
|
||||||
# bower_rails.resolve_before_precompile = true
|
|
||||||
|
|
||||||
# Invokes rake bower:clean before precompilation. Defaults to false
|
|
||||||
# bower_rails.clean_before_precompile = true
|
|
||||||
|
|
||||||
# Invokes rake bower:install:deployment instead rake bower:install. Defaults to false
|
|
||||||
# bower_rails.use_bower_install_deployment = true
|
|
||||||
#
|
|
||||||
# Invokes rake bower:install and rake bower:install:deployment with -F (force) flag. Defaults to false
|
|
||||||
# bower_rails.force_install = true
|
|
||||||
end
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
// Karma configuration
|
|
||||||
// Generated on Thu Jan 19 2017 22:15:55 GMT-0800 (PST)
|
|
||||||
|
|
||||||
module.exports = function(config) {
|
|
||||||
config.set({
|
|
||||||
|
|
||||||
// base path that will be used to resolve all patterns (eg. files, exclude)
|
|
||||||
basePath: '',
|
|
||||||
|
|
||||||
|
|
||||||
// frameworks to use
|
|
||||||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
|
||||||
frameworks: ['jasmine'],
|
|
||||||
|
|
||||||
|
|
||||||
// list of files / patterns to load in the browser
|
|
||||||
files: [
|
|
||||||
'vendor/assets/bower_components/angular/angular.js',
|
|
||||||
'node_modules/angular-mocks/angular-mocks.js',
|
|
||||||
'vendor/assets/javascripts/compiled.js',
|
|
||||||
'test/javascripts/**/*_spec.js'
|
|
||||||
],
|
|
||||||
|
|
||||||
|
|
||||||
// list of files to exclude
|
|
||||||
exclude: [
|
|
||||||
],
|
|
||||||
|
|
||||||
|
|
||||||
// preprocess matching files before serving them to the browser
|
|
||||||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
|
||||||
preprocessors: {
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// test results reporter to use
|
|
||||||
// possible values: 'dots', 'progress'
|
|
||||||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
|
||||||
reporters: ['progress'],
|
|
||||||
|
|
||||||
|
|
||||||
// web server port
|
|
||||||
port: 9876,
|
|
||||||
|
|
||||||
|
|
||||||
// enable / disable colors in the output (reporters and logs)
|
|
||||||
colors: true,
|
|
||||||
|
|
||||||
|
|
||||||
// level of logging
|
|
||||||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
|
||||||
logLevel: config.LOG_ERROR,
|
|
||||||
|
|
||||||
|
|
||||||
// enable / disable watching file and executing tests whenever any file changes
|
|
||||||
autoWatch: true,
|
|
||||||
|
|
||||||
|
|
||||||
// start these browsers
|
|
||||||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
|
||||||
browsers: ['PhantomJS'],
|
|
||||||
|
|
||||||
|
|
||||||
// Continuous Integration mode
|
|
||||||
// if true, Karma captures browsers, runs the tests and exits
|
|
||||||
singleRun: false,
|
|
||||||
|
|
||||||
// Concurrency level
|
|
||||||
// how many browser should be started simultaneous
|
|
||||||
concurrency: Infinity
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
namespace :bower do
|
|
||||||
desc "Install bower packages"
|
|
||||||
task :install do
|
|
||||||
on roles(:web) do
|
|
||||||
within "#{release_path}" do
|
|
||||||
with rails_env: fetch(:rails_env) do
|
|
||||||
execute :rake, "bower:install CI=true"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
7305
package-lock.json
generated
7305
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
15
package.json
15
package.json
@@ -7,20 +7,18 @@
|
|||||||
"url": "https://github.com/standardnotes/web"
|
"url": "https://github.com/standardnotes/web"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "bundle install && npm install && bundle exec rake bower:install && grunt",
|
"build": "bundle install && npm install && bundle exec && grunt",
|
||||||
"submodules": "git submodule update --init --force --remote",
|
"submodules": "git submodule update --init --force --remote",
|
||||||
"test": "karma start karma.conf.js --single-run"
|
"test": "karma start karma.conf.js --single-run"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"angular": "^1.6.1",
|
"angular": "1.6.9",
|
||||||
"angular-mocks": "^1.6.1",
|
|
||||||
"babel-cli": "^6.18.0",
|
"babel-cli": "^6.18.0",
|
||||||
"babel-plugin-angularjs-annotate": "^0.9.0",
|
"babel-plugin-angularjs-annotate": "^0.9.0",
|
||||||
"babel-plugin-transform-runtime": "^6.23.0",
|
"babel-plugin-transform-runtime": "^6.23.0",
|
||||||
"babel-preset-env": "^1.1.1",
|
"babel-preset-env": "^1.1.1",
|
||||||
"babel-preset-es2015": "^6.24.1",
|
"babel-preset-es2015": "^6.24.1",
|
||||||
"babel-preset-es2016": "^6.16.0",
|
"babel-preset-es2016": "^6.16.0",
|
||||||
"bower": "^1.8.0",
|
|
||||||
"chai": "^4.1.2",
|
"chai": "^4.1.2",
|
||||||
"connect": "^3.6.6",
|
"connect": "^3.6.6",
|
||||||
"grunt": "^1.0.3",
|
"grunt": "^1.0.3",
|
||||||
@@ -36,16 +34,11 @@
|
|||||||
"grunt-haml2html": "^0.3.1",
|
"grunt-haml2html": "^0.3.1",
|
||||||
"grunt-newer": "^1.2.0",
|
"grunt-newer": "^1.2.0",
|
||||||
"grunt-ng-annotate": "^3.0.0",
|
"grunt-ng-annotate": "^3.0.0",
|
||||||
"jasmine": "^2.5.3",
|
|
||||||
"karma": "^2.0.5",
|
|
||||||
"karma-cli": "^1.0.1",
|
|
||||||
"karma-jasmine": "^1.1.0",
|
|
||||||
"karma-phantomjs-launcher": "^1.0.2",
|
|
||||||
"mocha": "^5.2.0",
|
"mocha": "^5.2.0",
|
||||||
"serve-static": "^1.13.2",
|
"serve-static": "^1.13.2",
|
||||||
"sn-models": "0.1.12",
|
"sn-models": "0.1.13",
|
||||||
"sn-stylekit": "2.0.13",
|
"sn-stylekit": "2.0.13",
|
||||||
"standard-file-js": "0.3.39",
|
"standard-file-js": "file:~/Desktop/sn/dev/sfjs",
|
||||||
"grunt-shell": "^2.1.0"
|
"grunt-shell": "^2.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user