Skip to content

Commit

Permalink
Namespace nunjucks and components (#1458)
Browse files Browse the repository at this point in the history
Namespace nunjucks and components
  • Loading branch information
aliuk2012 authored Jun 21, 2019
2 parents 5bfbeba + a1eec4d commit 063cd8e
Show file tree
Hide file tree
Showing 323 changed files with 121 additions and 108 deletions.
2 changes: 1 addition & 1 deletion app/assets/scss/app-ie8.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@import "../../../src/all-ie8";
@import "../../../src/govuk/all-ie8";
@import "partials/app";
@import "partials/banner";
2 changes: 1 addition & 1 deletion app/assets/scss/app.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$govuk-show-breakpoints: true;

@import "../../../src/all";
@import "../../../src/govuk/all";
@import "partials/app";
@import "partials/banner";
@import "partials/prose";
2 changes: 1 addition & 1 deletion app/views/macros/loadComponentTemplate.njk
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{% macro loadComponentTemplate(componentName, params) %}
{%- include "../../../src/components/" + componentName + "/template.njk" -%}
{%- include componentName + "/template.njk" -%}
{% endmacro %}
4 changes: 2 additions & 2 deletions config/paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"package": "package/",
"public": "public/",
"sassdoc": "sassdoc/",
"src": "src/",
"components": "src/components/",
"src": "src/govuk/",
"components": "src/govuk/components/",
"ports": {
"app": 3000,
"test": 8888
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"ignore": [
"/dist/**/*.js",
"/package/**/*.js",
"/src/vendor/polyfills/**/*.js"
"/src/govuk/vendor/polyfills/**/*.js"
]
},
"jest": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/all.test.js → src/govuk/all.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-env jest */

const configPaths = require('../config/paths.json')
const configPaths = require('../../config/paths.json')
const PORT = configPaths.ports.test

const { renderSass } = require('../lib/jest-helpers')
const { renderSass } = require('../../lib/jest-helpers')

let baseUrl = 'http://localhost:' + PORT

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// const devices = require('puppeteer/DeviceDescriptors')
// const iPhone = devices['iPhone 6']
// const iPad = devices['iPad landscape']
const configPaths = require('../../../config/paths.json')
const configPaths = require('../../../../config/paths.json')
const PORT = configPaths.ports.test

let baseUrl = 'http://localhost:' + PORT
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

const { axe } = require('jest-axe')

const { render, getExamples } = require('../../../lib/jest-helpers')
const { render, getExamples } = require('../../../../lib/jest-helpers')

const examples = getExamples('accordion')

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-env jest */

const { allComponents } = require('../../lib/file-helper')
const { renderSass } = require('../../lib/jest-helpers')
const { allComponents } = require('../../../lib/file-helper')
const { renderSass } = require('../../../lib/jest-helpers')

const configPaths = require('../../config/paths.json')
const configPaths = require('../../../config/paths.json')

// We can't use the render function from jest-helpers, because we need control
// over the nunjucks environment.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const { render, getExamples } = require('../../../lib/jest-helpers')
const axe = require('../../../../lib/axe-helper')
const { render, getExamples } = require('../../../../lib/jest-helpers')

const examples = getExamples('back-link')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples } = require('../../../lib/jest-helpers')
const { render, getExamples } = require('../../../../lib/jest-helpers')

const examples = getExamples('breadcrumbs')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-env jest */

const configPaths = require('../../../config/paths.json')
const configPaths = require('../../../../config/paths.json')
const PORT = configPaths.ports.test

let baseUrl = 'http://localhost:' + PORT
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples } = require('../../../lib/jest-helpers')
const { render, getExamples } = require('../../../../lib/jest-helpers')

const examples = getExamples('button')

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-env jest */

const configPaths = require('../../../config/paths.json')
const configPaths = require('../../../../config/paths.json')
const PORT = configPaths.ports.test
const baseUrl = `http://localhost:${PORT}`

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

const { axe } = require('jest-axe')

const { render, getExamples, htmlWithClassName } = require('../../../lib/jest-helpers')
const { render, getExamples, htmlWithClassName } = require('../../../../lib/jest-helpers')

const examples = getExamples('textarea')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const cheerio = require('cheerio')

const configPaths = require('../../../config/paths.json')
const configPaths = require('../../../../config/paths.json')
const PORT = configPaths.ports.test

let baseUrl = 'http://localhost:' + PORT
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples, htmlWithClassName } = require('../../../lib/jest-helpers')
const { render, getExamples, htmlWithClassName } = require('../../../../lib/jest-helpers')

const examples = getExamples('checkboxes')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples, htmlWithClassName } = require('../../../lib/jest-helpers')
const { render, getExamples, htmlWithClassName } = require('../../../../lib/jest-helpers')

const examples = getExamples('date-input')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-env jest */

const configPaths = require('../../../config/paths.json')
const configPaths = require('../../../../config/paths.json')
const PORT = configPaths.ports.test

let baseUrl = 'http://localhost:' + PORT
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples } = require('../../../lib/jest-helpers')
const { render, getExamples } = require('../../../../lib/jest-helpers')

const examples = getExamples('details')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples } = require('../../../lib/jest-helpers')
const { render, getExamples } = require('../../../../lib/jest-helpers')

const examples = getExamples('error-message')

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-env jest */

const configPaths = require('../../../config/paths.json')
const configPaths = require('../../../../config/paths.json')
const PORT = configPaths.ports.test

let baseUrl = 'http://localhost:' + PORT
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples } = require('../../../lib/jest-helpers')
const { render, getExamples } = require('../../../../lib/jest-helpers')

const examples = getExamples('error-summary')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples } = require('../../../lib/jest-helpers')
const { render, getExamples } = require('../../../../lib/jest-helpers')

const examples = getExamples('fieldset')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples, htmlWithClassName } = require('../../../lib/jest-helpers')
const { render, getExamples, htmlWithClassName } = require('../../../../lib/jest-helpers')

const examples = getExamples('file-upload')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples } = require('../../../lib/jest-helpers')
const { render, getExamples } = require('../../../../lib/jest-helpers')

const examples = getExamples('footer')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const devices = require('puppeteer/DeviceDescriptors')
const iPhone = devices['iPhone 6']
const configPaths = require('../../../config/paths.json')
const configPaths = require('../../../../config/paths.json')
const PORT = configPaths.ports.test

let baseUrl = 'http://localhost:' + PORT
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples } = require('../../../lib/jest-helpers')
const { render, getExamples } = require('../../../../lib/jest-helpers')

const examples = getExamples('header')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples } = require('../../../lib/jest-helpers')
const { render, getExamples } = require('../../../../lib/jest-helpers')

const examples = getExamples('hint')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples, htmlWithClassName } = require('../../../lib/jest-helpers')
const { render, getExamples, htmlWithClassName } = require('../../../../lib/jest-helpers')

const examples = getExamples('input')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples } = require('../../../lib/jest-helpers')
const { render, getExamples } = require('../../../../lib/jest-helpers')

const examples = getExamples('inset-text')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples } = require('../../../lib/jest-helpers')
const { render, getExamples } = require('../../../../lib/jest-helpers')

const examples = getExamples('label')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples } = require('../../../lib/jest-helpers')
const { render, getExamples } = require('../../../../lib/jest-helpers')

const examples = getExamples('panel')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples, htmlWithClassName } = require('../../../lib/jest-helpers')
const { render, getExamples, htmlWithClassName } = require('../../../../lib/jest-helpers')

const examples = getExamples('phase-banner')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const cheerio = require('cheerio')

const configPaths = require('../../../config/paths.json')
const configPaths = require('../../../../config/paths.json')
const PORT = configPaths.ports.test

let baseUrl = 'http://localhost:' + PORT
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples, htmlWithClassName } = require('../../../lib/jest-helpers')
const { render, getExamples, htmlWithClassName } = require('../../../../lib/jest-helpers')

const examples = getExamples('radios')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples, htmlWithClassName } = require('../../../lib/jest-helpers')
const { render, getExamples, htmlWithClassName } = require('../../../../lib/jest-helpers')

const examples = getExamples('select')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
/* eslint-env jest */

const axe = require('../../../lib/axe-helper')
const axe = require('../../../../lib/axe-helper')

const { render, getExamples } = require('../../../lib/jest-helpers')
const { render, getExamples } = require('../../../../lib/jest-helpers')

const examples = getExamples('skip-link')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 063cd8e

Please sign in to comment.