diff --git a/app.js b/app.js deleted file mode 100644 index 45969d8..0000000 --- a/app.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -// Declare app level module which depends on views, and components -angular.module('myApp', [ - 'ngRoute', - 'myApp.about', - 'myApp.authors', - 'myApp.site', - 'myApp.build', - 'myApp.configure', - 'myApp.post', - 'myApp.version', - 'myApp.services' -]). -config(['$routeProvider', function ($routeProvider) { - $routeProvider.otherwise({redirectTo: '/about'}); -}]); diff --git a/bower.json b/bower.json index d17de8f..d65095a 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { - "name": "deardesi", - "version": "1.0.0", + "name": "desirae", + "version": "0.1.0", "authors": [ "AJ ONeal " ], diff --git a/components/desirae/desirae.js b/components/desirae/desirae.js deleted file mode 100644 index a71b9cc..0000000 --- a/components/desirae/desirae.js +++ /dev/null @@ -1,63 +0,0 @@ -angular.module('myApp.services', []). - factory('Desirae', ['$q', function($q) { - var Desi = window.Desi || require('./deardesi').Desi - , desi = {} - , fsapi = window.fsapi - ; - - return { - reset: function () { - desi = {}; - } - , toDesiDate: Desi.toLocaleDate - , meta: function () { - var d = $q.defer() - ; - - if (desi.meta) { - d.resolve(desi); - return d.promise; - } - - Desi.init(desi).then(function () { - d.resolve(desi); - }); - - return d.promise; - } - , build: function (env) { - var d = $q.defer() - ; - - if (desi.built) { - d.resolve(desi); - return d.promise; - } - - Desi.buildAll(desi, env).then(function () { - d.resolve(desi); - }); - - return d.promise; - } - , write: function (env) { - var d = $q.defer() - ; - - if (desi.written) { - d.resolve(desi); - return d.promise; - } - - Desi.write(desi, env).then(function () { - d.resolve(desi); - }); - - return d.promise; - } - , putFiles: function (files) { - return $q.when(fsapi.putFiles(files)); - } - }; - }] -); diff --git a/components/version/interpolate-filter.js b/components/version/interpolate-filter.js deleted file mode 100644 index 03bb198..0000000 --- a/components/version/interpolate-filter.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -angular.module('myApp.version.interpolate-filter', []) - -.filter('interpolate', ['version', function(version) { - return function(text) { - return String(text).replace(/\%VERSION\%/mg, version); - }; -}]); diff --git a/components/version/interpolate-filter_test.js b/components/version/interpolate-filter_test.js deleted file mode 100644 index ff56c52..0000000 --- a/components/version/interpolate-filter_test.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -describe('myApp.version module', function() { - beforeEach(module('myApp.version')); - - describe('interpolate filter', function() { - beforeEach(module(function($provide) { - $provide.value('version', 'TEST_VER'); - })); - - it('should replace VERSION', inject(function(interpolateFilter) { - expect(interpolateFilter('before %VERSION% after')).toEqual('before TEST_VER after'); - })); - }); -}); diff --git a/components/version/version-directive.js b/components/version/version-directive.js deleted file mode 100644 index 74088f8..0000000 --- a/components/version/version-directive.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -angular.module('myApp.version.version-directive', []) - -.directive('appVersion', ['version', function(version) { - return function(scope, elm, attrs) { - elm.text(version); - }; -}]); diff --git a/components/version/version-directive_test.js b/components/version/version-directive_test.js deleted file mode 100644 index 4a59e11..0000000 --- a/components/version/version-directive_test.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -describe('myApp.version module', function() { - beforeEach(module('myApp.version')); - - describe('app-version directive', function() { - it('should print current version', function() { - module(function($provide) { - $provide.value('version', 'TEST_VER'); - }); - inject(function($compile, $rootScope) { - var element = $compile('')($rootScope); - expect(element.text()).toEqual('TEST_VER'); - }); - }); - }); -}); diff --git a/components/version/version.js b/components/version/version.js deleted file mode 100644 index 227b913..0000000 --- a/components/version/version.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -angular.module('myApp.version', [ - 'myApp.version.interpolate-filter', - 'myApp.version.version-directive' -]) - -.value('version', '0.8.0'); diff --git a/components/version/version_test.js b/components/version/version_test.js deleted file mode 100644 index 4ca6880..0000000 --- a/components/version/version_test.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -describe('myApp.version module', function() { - beforeEach(module('myApp.version')); - - describe('version service', function() { - it('should return current version', inject(function(version) { - expect(version).toEqual('0.1'); - })); - }); -}); diff --git a/package.json b/package.json index 3553419..a01aa4d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "deardesi", + "name": "desirae", "version": "0.1.0", "description": "An in-browser knockoff of the Ruhoh static blog generator. (similar to Jekyll, Octopress, Nanoc, etc)", "main": "server.js", diff --git a/views/about/about.html b/views/about/about.html deleted file mode 100644 index caf5ac4..0000000 --- a/views/about/about.html +++ /dev/null @@ -1,47 +0,0 @@ -
-
-
- - - -
-
-
-

Setup your new blog in just 5 minutes.

-
-
-
-
-
-
-
- -
-
-
-

Dear Desi is...

-
-
    -
  • Builds in the Browser -
      -
    • The in-browser static blog generator
    • -
    • Write content in Markdown, Jade, or HTML
    • -
    • Mustache Templates
    • -
    -
  • -
  • Git, Dropbox, or regular Folders for management
  • -
  • Go headless with Node.js support
  • -
  • Dual Licensed Apache2 and MIT
  • -
  • No Ruby version Hell - it'll still work in 6 months! :-D
  • -
-

What are you waiting for?

-
- Get Started -
-
-
-
-
-
diff --git a/views/about/about.js b/views/about/about.js deleted file mode 100644 index ad83f44..0000000 --- a/views/about/about.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -angular.module('myApp.about', ['ngRoute']) - -.config(['$routeProvider', function($routeProvider) { - $routeProvider.when('/about', { - templateUrl: 'views/about/about.html', - controller: 'AboutCtrl' - }); -}]) - -.controller('AboutCtrl', [function() { - -}]); diff --git a/views/about/view2_test.js b/views/about/view2_test.js deleted file mode 100644 index 07b34d6..0000000 --- a/views/about/view2_test.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -describe('myApp.view2 module', function() { - - beforeEach(module('myApp.view2')); - - describe('view2 controller', function(){ - - it('should ....', inject(function($controller) { - //spec body - var view2Ctrl = $controller('View2Ctrl'); - expect(view2Ctrl).toBeDefined(); - })); - - }); -}); \ No newline at end of file diff --git a/views/authors/authors.html b/views/authors/authors.html deleted file mode 100644 index 99ea45d..0000000 --- a/views/authors/authors.html +++ /dev/null @@ -1,233 +0,0 @@ -
-
- -
- -
-
-
- /authors/.yml -
-
- -
-
-
-
-
-
-
-
-
- Profile Basics - -
-
-
- -
- -
-
-
- -
-
- -
- -
-
-
-
- -
-
-
- -
- -
-
-
- -
-
- -
- -
-
-
-
- -
-
-
- -
- -
-
-
-
- -
-
-
- -
- -
-
-
-
- - -
-
-
- -
-
-
- Social - -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
-
-
- -
-
-
- Developers -
- -
- -
-
-
- -
- -
-
- -
-
-
- -
-
-
- Feeds - -
- -
- -
-
- -
-
-
- - - -
-
-
- - diff --git a/views/authors/authors.js b/views/authors/authors.js deleted file mode 100644 index 1390a38..0000000 --- a/views/authors/authors.js +++ /dev/null @@ -1,119 +0,0 @@ -'use strict'; - -angular.module('myApp.authors', ['ngRoute']) - -.config(['$routeProvider', function($routeProvider) { - $routeProvider.when('/authors', { - templateUrl: 'views/authors/authors.html', - controller: 'AuthorsCtrl as Authors' - }); -}]) - -.controller('AuthorsCtrl' - , ['$scope', '$timeout', '$location', 'Desirae' - , function($scope, $timeout, $location, Desirae) { - var scope = this - ; - - scope.newAuthor = function () { - console.log('new author'); - scope.new = { filename: 'new' }; - scope.selectAuthor(scope.new); - }; - - scope.selectAuthor = function (author) { - // TODO watch any change - scope.selectedAuthor = author || scope.selectedAuthor; - scope.updateHeadshotUrlNow(); - }; - - scope.upsert = function () { - var author = scope.selectedAuthor - , files = [] - , filename = author.filename - ; - - delete author.filename; - if ('new' !== filename && filename !== author.handle) { - files.push({ path: 'authors/' + filename + '.yml', contents: '', delete: true }); - } - files.push({ path: 'authors/' + author.handle + '.yml', contents: window.jsyaml.dump(author) }); - - console.log(files); - - Desirae.putFiles(files).then(function (results) { - console.log('updated author', results); - $location.path('/site'); - }).catch(function (e) { - author.filename = filename; - console.error(e); - window.alert("Error Nation! :/"); - throw e; - }); - }; - - scope.updateHeadshotUrlNow = function () { - var gravatar = 'http://www.gravatar.com/avatar/' + window.md5((scope.selectedAuthor.email||'foo').toLowerCase()) + '?d=identicon' - ; - - if (scope.selectedAuthor.headshot) { - scope.headshot = scope.selectedAuthor.headshot; - } - else if (scope.selectedAuthor.email) { - scope.headshot = gravatar; - } - else { - scope.headshot = 'http://www.gravatar.com/avatar/' + window.md5((scope.selectedAuthor.email||'foo').toLowerCase()) + '?d=mm'; - } - }; - - scope.updateHeadshotUrl = function () { - $timeout.cancel(scope.hslock); - scope.hslock = $timeout(function () { - scope.updateHeadshotUrlNow(); - }, 300); - }; - - function init() { - scope.newAuthor(); - - console.log('desi loading'); - Desirae.meta().then(function (desi) { - var filename - ; - - scope.blogdir = desi.blogdir.path.replace(/^\/(Users|home)\/[^\/]+\//, '~/'); - desi.authors = desi.authors || {}; - desi.authors.new = scope.new; - scope.authors = desi.authors; - - Object.keys(desi.authors).forEach(function (filename) { - if ('new' === filename) { - return; - } - desi.authors[filename].filename = filename; - desi.authors[filename].handle = desi.authors[filename].handle || filename; - }); - - filename = Object.keys(desi.authors)[0]; - scope.selectedAuthor = desi.authors[filename]; - - scope.updateHeadshotUrlNow(); - }).catch(function (e) { - window.alert("An Error Occured. Most errors that occur in the init phase are parse errors in the config files or permissions errors on files or directories, but check the error console for details."); - console.error(e); - throw e; - }); - } - - init(); - /* - $scope.$watch(angular.bind(this, function () { return this.selectedAuthor; }), function (newValue, oldValue) { - //$scope.$watch('Authors.selecteAuthor', function (newValue, oldValue) - console.log(newValue, oldValue); - if(newValue !== oldValue) { - scope.dirty = true; - } - }, true); - */ -}]); diff --git a/views/build/build.html b/views/build/build.html deleted file mode 100644 index ff53f6f..0000000 --- a/views/build/build.html +++ /dev/null @@ -1,119 +0,0 @@ -
-
-
- -
- -
-
-

Are you ready?

-

- Bonesaw is READY! -

-

- -

- Push the RED button... you know you want to! -
-
- -
-
-
-
- Production -

- -
- -
- -
-
-
- -
- -
- -
-
- -
-
- -
-
- -
-
-
-
-
-
- Development -

- -
- -
- -
-
-
- -
- -
- -
-
- -
-
- -
-
- -
-
-
-
-
-
- -
-
diff --git a/views/build/build.js b/views/build/build.js deleted file mode 100644 index 9533557..0000000 --- a/views/build/build.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - -angular.module('myApp.build', ['ngRoute']) - -.config(['$routeProvider', function($routeProvider) { - $routeProvider.when('/build', { - templateUrl: 'views/build/build.html', - controller: 'BuildCtrl as Build' - }); -}]) - -.controller('BuildCtrl' - , ['$scope', '$location', '$timeout', 'Desirae' - , function ($scope, $location, $timeout, DesiraeService) { - var scope = this - , path = window.path - ; - - function init() { - console.log('desi loading'); - DesiraeService.meta().then(function (desi) { - scope.blogdir = desi.blogdir.path.replace(/^\/(Users|home)\/[^\/]+\//, '~/'); - scope.site = desi.site; - - console.log(desi.site.base_url); - console.log(desi.site.base_path); - scope.production_url = desi.site.base_url + path.join('/', desi.site.base_path); - console.log(scope.production_url); - - // this is the responsibility of the build system (Dear Desi), not the library (Desirae) - scope.development_url = location.href.replace(/\/(#.*)?$/, '') + path.join('/', 'compiled_dev'); - console.log(scope.development_url); - - }).catch(function (e) { - window.alert("An Error Occured. Most errors that occur in the init phase are parse errors in the config files or permissions errors on files or directories, but check the error console for details."); - console.error(e); - throw e; - }); - - scope.extensions = ['md', 'html']; - } - - scope.onError = function (e) { - console.error(e); - if (window.confirm("Encountered an error. Please inspect the console.\n\nWould you like to ignore the error and continue?")) { - return window.Promise.resolve(); - } else { - return window.Promise.reject(); - } - }; - - scope.buildOne = function (envstr) { - var env - ; - - // TODO is there a legitimate case where in addition to base_path (root of the blog) - // a user would need owner_base? i.e. school.edu/~/rogers/blog school.edu/~/rogers/assets - if ('production' === envstr) { - env = { - url: scope.production_url - , base_url: scope.development_url.replace(/(https?:\/\/[^\/#?]+)/, '$1') - , compiled_path: 'compiled' - , since: 0 - , onError: scope.onError - }; - } else { - env = { - url: scope.development_url - , base_url: scope.development_url.replace(/(https?:\/\/[^\/#?]+)/, '$1') - , base_path: scope.development_url.replace(/https?:\/\/[^\/#?]+/, '') - , compiled_path: 'compiled_dev' - , since: 0 - , onError: scope.onError - }; - } - - return DesiraeService.build(env).then(function () { - DesiraeService.write(env); - }); - }; - - scope.build = function (envs) { - window.forEachAsync(envs, function (env) { - return scope.buildOne(env); - }).then(function () { - window.alert('Build(s) Complete'); - }); - }; - - init(); -}]); diff --git a/views/configure/configure.html b/views/configure/configure.html deleted file mode 100644 index b950a9a..0000000 --- a/views/configure/configure.html +++ /dev/null @@ -1,72 +0,0 @@ -
-
- -
- -
-
-
-
-
- Advanced - -
- -
- -
-
- -
-
- -
- -
- -
-
- -
-
- -
- -
- -
-
- -
-
- -
- -
- -
-
- -
-
- -
- -
- -
-
- -
-
- -
-
-
-
- -
-
diff --git a/views/configure/configure.js b/views/configure/configure.js deleted file mode 100644 index d931c92..0000000 --- a/views/configure/configure.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -angular.module('myApp.configure', ['ngRoute']) - -.config(['$routeProvider', function($routeProvider) { - $routeProvider.when('/configure', { - templateUrl: 'views/configure/configure.html', - controller: 'ConfigureCtrl as Configure' - }); -}]) - -.controller('ConfigureCtrl', [function() { -}]); diff --git a/views/create/create.html b/views/create/create.html deleted file mode 100644 index 2b4a555..0000000 --- a/views/create/create.html +++ /dev/null @@ -1,83 +0,0 @@ -
-
- -
- -
-
-
-
-
-
- -
- -
-
-
- -
- -
- -
-
-
-
- -
- - A longer block of help text that breaks onto a new line and may extend beyond one line. -
-
-
- -
-
- -
-
- -
-
-
-
- -
- -
- -
-
-
-
- - -
-
-
-
-
- diff --git a/views/post/post.html b/views/post/post.html deleted file mode 100644 index cb11ccc..0000000 --- a/views/post/post.html +++ /dev/null @@ -1,186 +0,0 @@ -
- -
- -
- -
-
-
-
-
- -
- -
-
- -
- -
- - Put your lovely post here, in github-flavored markdown! -
-
- -
- -
- - -
-
- -
- -
- - The description is often used by search engines as the snippit shown in search results. -
-
- -
- -
- -
-
- -
- -
- -
-
- - - - - - - - - -
-
- - -
-
-
- -
-
- -
- -
diff --git a/views/post/post.js b/views/post/post.js deleted file mode 100644 index e3f40fe..0000000 --- a/views/post/post.js +++ /dev/null @@ -1,165 +0,0 @@ -'use strict'; -angular.module('myApp.post', ['ngRoute']) - -.config(['$routeProvider', function($routeProvider) { - $routeProvider.when('/post', { - templateUrl: 'views/post/post.html', - controller: 'PostCtrl as Post' - }); -}]) - -.controller('PostCtrl' - , ['$scope', '$location', '$timeout', 'Desirae' - , function ($scope, $location, $timeout, Desirae) { - var scope = this - ; - - function init() { - console.log('desi loading'); - Desirae.meta().then(function (desi) { - scope.blogdir = desi.blogdir.path.replace(/^\/(Users|home)\/[^\/]+\//, '~/'); - scope.site = desi.site; - newPost(); - - updateDate(); - }).catch(function (e) { - window.alert("An Error Occured. Most errors that occur in the init phase are parse errors in the config files or permissions errors on files or directories, but check the error console for details."); - console.error(e); - throw e; - }); - - scope.extensions = ['md', 'html']; - } - - function newPost() { - scope.selected = { - format: 'md' - , permalink: "/article/new.md" - , uuid: window.uuid.v4() - , abspath: scope.blogdir - , post: { - yml: { - title: "" - , permalink: "/article/new.md" - , date: Desirae.toDesiDate(new Date())// "YYYY-MM-DD HH:MM pm" // TODO desirae - , updated: null - , description: "" - , categories: [] - , tags: [] - , theme: null - , layout: null - , swatch: null - } - } - }; - scope.selected.date = scope.selected.post.yml.date; - scope.selected.post.frontmatter = window.jsyaml.dump(scope.selected.post.yml).trim(); - } - - scope.onChange = function () { - var post = scope.selected.post - , selected = scope.selected - ; - - post.yml.title = post.yml.title || ''; - post.yml.description = post.yml.description || ''; - - if (selected.permalink === post.yml.permalink) { - selected.permalink = '/articles/' + post.yml.title.toLowerCase() - .replace(/["']/g, '') - .replace(/\W/g, '-') - .replace(/^-+/g, '') - .replace(/-+$/g, '') - .replace(/--/g, '-') - + '.' + selected.format - ; - - post.yml.permalink = selected.permalink; - } - if (window.path.extname(post.yml.permalink) !== '.' + selected.format) { - post.yml.permalink = post.yml.permalink.replace(/\.\w+$/, '.' + selected.format); - } - - post.frontmatter = window.jsyaml.dump(post.yml).trim(); - - // TODO use some sort of filepath pattern in config.yml - selected.path = window.path.join((selected.collection || 'posts'), window.path.basename(post.yml.permalink)); - selected.abspath = window.path.join(scope.blogdir, selected.path); - }; - scope.onFrontmatterChange = function () { - var data - ; - - try { - if (!scope.selected.post.frontmatter || !scope.selected.post.frontmatter.trim()) { - throw new Error('deleted frontmatter'); - } - data = window.jsyaml.load(scope.selected.post.frontmatter); - scope.selected.format = data.permalink.replace(/.*\.(\w+$)/, '$1'); - if (!data.permalink) { - data = scope.selected.permalink; - } - scope.selected.post.yml = data; - } catch(e) { - console.error(e); - console.error('ignoring update that created parse error'); - scope.selected.post.frontmatter = window.jsyaml.dump(scope.selected.post.yml).trim(); - } - }; - - function updateDate() { - $timeout.cancel(scope.dtlock); - scope.dtlock = $timeout(function () { - if (scope.selected && scope.selected.date === scope.selected.post.yml.date) { - scope.selected.date = scope.selected.post.yml.date = Desirae.toDesiDate(new Date()); - } - scope.onChange(); - updateDate(); - }, 60 * 1000); - } - - scope.upsert = function () { - console.log('upserted'); - if (-1 === scope.extensions.indexOf(scope.selected.format)) { - window.alert('.' + scope.selected.format + ' is not a supported extension.\n\nPlease choose from: .' + scope.extensions.join(' .')); - return; - } - - scope.selected.post.yml.uuid = scope.selected.uuid; - ['updated', 'theme', 'layout', 'swatch'].forEach(function (key) { - if (!scope.selected.post.yml[key]) { - delete scope.selected.post.yml[key]; - } - }); - scope.onChange(); - - var files = [] - ; - - files.push({ - path: scope.selected.path - , contents: - '---\n' - + scope.selected.post.frontmatter.trim() - + '\n' - + '---\n' - + '\n' - + scope.selected.post.body.trim() - }); - - console.log(files); - Desirae.putFiles(files).then(function (results) { - console.log('TODO check for error'); - console.log(results); - $location.path('/build'); - }).catch(function (e) { - $timeout.cancel(scope.dtlock); - console.error(scope.site); - console.error(e); - window.alert("Error Nation! :/"); - throw e; - }); - }; - - init(); -}]); diff --git a/views/site/site.html b/views/site/site.html deleted file mode 100644 index 10ee7ef..0000000 --- a/views/site/site.html +++ /dev/null @@ -1,200 +0,0 @@ -
-
- -
- - -
-
-
-
-
- General - -
- -
- -
-
- -
- -
- -
-
- -
-
-
- -
- -
-
-
-
- - - - - - -
- -
- -
-
-
- -
- -
- -
-
- -
- -
- -
-
- -
-
-
-
- - -
-
-
-
- Development - -
- -
- -
-
-
- -
- -
- -
-
- -
- -
- -
-
- -
-
-
-
- - -
-
-
-
- Plugins - -
- -
- -
- Found in the Admin section of Google Analytics -
-
- -
- -
- -
- Found under Admin > Settings in Disqus -
-
- -
-
-
-
- - -
-
diff --git a/views/site/site.js b/views/site/site.js deleted file mode 100644 index e11e6a7..0000000 --- a/views/site/site.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -angular.module('myApp.site', ['ngRoute']) - -.config(['$routeProvider', function($routeProvider) { - $routeProvider.when('/site', { - templateUrl: 'views/site/site.html', - controller: 'SiteCtrl as Site' - }); -}]) - -.controller('SiteCtrl', ['$scope', '$location', 'Desirae', function ($scope, $location, Desirae) { - var scope = this - ; - - - function init() { - console.log('desi loading'); - Desirae.meta().then(function (desi) { - scope.blogdir = desi.blogdir.path.replace(/^\/(Users|home)\/[^\/]+\//, '~/'); - scope.site = desi.site; - }).catch(function (e) { - window.alert("An Error Occured. Most errors that occur in the init phase are parse errors in the config files or permissions errors on files or directories, but check the error console for details."); - console.error(e); - throw e; - }); - } - - scope.upsert = function () { - var files = [] - ; - - files.push({ path: 'site.yml', contents: scope.site }); - - console.log(files); - Desirae.putFiles(files).then(function (results) { - console.log('TODO check for error'); - console.log(results); - $location.path('/post'); - }).catch(function (e) { - console.error(scope.site); - console.error(e); - window.alert("Error Nation! :/"); - throw e; - }); - }; - - init(); -}]); diff --git a/views/site/view1_test.js b/views/site/view1_test.js deleted file mode 100644 index 14ba79b..0000000 --- a/views/site/view1_test.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -describe('myApp.view1 module', function() { - - beforeEach(module('myApp.view1')); - - describe('view1 controller', function(){ - - it('should ....', inject(function($controller) { - //spec body - var view1Ctrl = $controller('View1Ctrl'); - expect(view1Ctrl).toBeDefined(); - })); - - }); -}); \ No newline at end of file