Skip to content

Commit aa16df5

Browse files
author
Alex Dunne
committed
some message
1 parent 586cd11 commit aa16df5

File tree

1 file changed

+6
-163
lines changed

1 file changed

+6
-163
lines changed

index.md

Lines changed: 6 additions & 163 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Pagination is described as:
1212
> The process of dividing a document into discrete pages, either electronic pages or printed pages.
1313
(<https://en.wikipedia.org/wiki/Pagination> accessed June 26, 2017).
1414
15-
"Something about pagination here, goal oriented finding task (i.e. finding an item), easier to skip to a certain page where the item may be. Easier for people to remember the general location of items (https://www.nngroup.com/articles/infinite-scrolling/). Mention Google search results are paginated?"
15+
Pagination is the most common way of separating lists of content into a smaller set of digestible data. Pagination lends itself to goal oriented finding tasks, such as finding a specific record from a list of records in a database. Additionally, pagination assists the user in finding a record they have previously found. If the user roughly knows where they found the record previously, they can use the pagination page number navigation to find the record again.
1616

1717
### Infinite scroll
1818
Infinite scroll is described as:
@@ -43,9 +43,7 @@ As always, the example project for this blog post can be found at the Codevate g
4343

4444
### Staring a new project
4545

46-
# May swap this out for just adding the files to the index.html file
47-
48-
To begin with, we will be using npm and bower to bring in our dependencies, and we will be using Grunt as our task runner. First, lets create a new npm project with `npm init`. Follow the question, feel free to press the enter key for all of the questions as they aren't important to this demonstration.
46+
We will be using npm and bower to bring in our dependencies, and we will be using Grunt as our task runner. First, lets create a new npm project with `npm init`. Follow the question, feel free to press the enter key for all of the questions as they aren't important to this demonstration.
4947

5048
Now npm is ready we can include our Grunt dependencies:
5149

@@ -65,9 +63,7 @@ With all of our dependencies installed, we are ready to create our build process
6563

6664
### Setting up the build process
6765

68-
**Not sure if we really want this**
69-
70-
Now that Grunt is installed we can start creating our basic build process to concat, transpile, and minify the JavaScript. First we need a Gruntfile so that Grunt knows what plugins we want to use and also so that we can outline our build steps.
66+
Now that Grunt is and our dev dependencies are installed we can start creating our basic build process to concat, transpile, and minify the JavaScript. First we need a Gruntfile so that Grunt knows what plugins we want to use and also so that we can outline our build steps.
7167

7268
```
7369
'use strict';
@@ -87,7 +83,7 @@ module.exports = function (grunt) {
8783
};
8884
```
8985

90-
Now we can define out build steps. Create a new directory in the root of the project and name it `grunt`. Inside this directory create a new file named `aliases.yml`, this is where we will outline our build steps. Copy the following into the `aliases.yml` file:
86+
Create a new directory in the root of the project and name it `grunt`. Inside this directory create a new file named `aliases.yml`, this is where we will outline our build steps. Copy the following into the `aliases.yml` file:
9187

9288
```
9389
build:
@@ -104,163 +100,10 @@ default:
104100
- watch
105101
```
106102

107-
We now need to define each of the steps:
108-
109-
```
110-
// grunt/babel.js
111-
112-
'use strict';
113-
114-
module.exports = {
115-
dist: {
116-
files: {
117-
'dist/bundle.transpiled.js': 'dist/bundle.concat.js'
118-
}
119-
}
120-
};
121-
122-
```
123-
124-
```
125-
// grunt/clean.js
126-
127-
'use strict';
128-
129-
module.exports = {
130-
js: [
131-
'dist/bundle.*',
132-
'dist/templates.js',
133-
],
134-
vendors: [
135-
'dist/vendors.*',
136-
],
137-
};
138-
```
139-
140-
```
141-
// grunt/concat.js
142-
143-
'use strict';
144-
145-
module.exports = {
146-
options: {
147-
stripBanners: {
148-
block: true
149-
},
150-
sourceMap: true
151-
},
152-
app: {
153-
src: [
154-
'src/**/*.module.js',
155-
'src/app.js',
156-
'src/**/*.js',
157-
],
158-
dest: 'dist/bundle.concat.js'
159-
},
160-
vendors: {
161-
src: [
162-
'bower_components/angular/angular.js',
163-
'bower_components/jQuery/dist/jquery.js',
164-
],
165-
dest: 'dist/vendors.concat.js'
166-
}
167-
};
168-
```
169-
170-
```
171-
// grunt/concurrent.js
172-
173-
'use strict';
174-
175-
module.exports = {
176-
minify: ['uglify'],
177-
};
178-
```
179-
180-
```
181-
// grunt/copy.js
182-
183-
'use strict';
184-
185-
module.exports = {
186-
app: {
187-
files: [
188-
{
189-
expand: true,
190-
flatten: true,
191-
src: [
192-
'src/index.html',
193-
'src/css/app.css',
194-
],
195-
dest: 'dist'
196-
},
197-
]
198-
}
199-
};
200-
```
201-
202-
```
203-
// grunt/ngtemplates.js
103+
With our build steps in place we need to add each of the plugin config files. You can find these in the `grunt` directory of the github project here. **LINK TO GITHUB PAGE**.
204104

205-
'use strict';
105+
With the Grunt tasks setup we are now able to start the build process by simply typing `grunt` in the command line. Additionally, as we have added a watch step to the default task, whenever we change a `src` file grunt will automatically run.
206106

207-
module.exports = {
208-
app: {
209-
src: 'src/**/*.tpl.html',
210-
dest: 'dist/templates.js',
211-
options: {
212-
htmlmin: { collapseWhitespace: true, collapseBooleanAttributes: true },
213-
}
214-
}
215-
};
216-
```
217-
218-
```
219-
// grunt/uglify.js
220-
221-
'use strict';
222-
223-
module.exports = {
224-
options: {
225-
sourceMap: true,
226-
sourceMapIncludeSources: true,
227-
sourceMapIn: function (path) {
228-
return path + '.map';
229-
}
230-
},
231-
app: {
232-
src: 'dist/bundle.transpiled.js',
233-
dest: 'dist/bundle.min.js'
234-
},
235-
vendors: {
236-
src: 'dist/vendors.concat.js',
237-
dest: 'dist/vendors.min.js'
238-
}
239-
};
240-
```
241-
242-
```
243-
// grunt/watch.js
244-
245-
'use strict';
246-
247-
module.exports = {
248-
js: {
249-
files: ['src/app.js', 'src/**/*.{js,tpl.html}'],
250-
tasks: ['build'],
251-
options: {
252-
livereload: true
253-
}
254-
},
255-
static: {
256-
files: ['src/index.html', 'src/css/app.css'],
257-
tasks: ['build'],
258-
options: {
259-
livereload: true
260-
}
261-
}
262-
};
263-
```
264107

265108
### Implementing the virtual list
266109
To begin with we need to create a new module for our demo app.

0 commit comments

Comments
 (0)