Skip to content

Commit fafb86e

Browse files
committed
refactor(package): remove 'itk' prefix from module names
Reduce redundancy with the package name. BREAKING CHANGE: require('itk/itkreadImageFile.js') is now require('itk/readImageFile.js')
1 parent 0e6b4ba commit fafb86e

37 files changed

Lines changed: 62 additions & 62 deletions

build.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ try {
5353

5454
// Build the Emscripten mobules with ninja
5555
console.log('\nRunning ninja...')
56-
const ninjaCall = spawnSync(dockcross, ['ninja', '-Cbuild'], {
56+
const ninjaCall = spawnSync(dockcross, ['ninja', '-j3', '-Cbuild'], {
5757
env: process.env,
5858
stdio: 'inherit'
5959
})
@@ -68,7 +68,7 @@ try {
6868
if (err.code != 'EEXIST') throw err
6969
}
7070
try {
71-
fs.mkdirSync(path.join('dist', 'itkImageIOs'))
71+
fs.mkdirSync(path.join('dist', 'ImageIOs'))
7272
} catch(err) {
7373
if (err.code != 'EEXIST') throw err
7474
}
@@ -77,11 +77,11 @@ try {
7777
} catch(err) {
7878
if (err.code != 'EEXIST') throw err
7979
}
80-
imageIOFiles = glob.sync(path.join('build', 'itkImageIOs', '*.js'))
80+
imageIOFiles = glob.sync(path.join('build', 'ImageIOs', '*.js'))
8181
const copyIOModules = function (imageIOFile, callback) {
8282
let io = path.basename(imageIOFile)
8383
console.log('Copying ' + io + ' ...')
84-
let output = path.join('dist', 'itkImageIOs', io)
84+
let output = path.join('dist', 'ImageIOs', io)
8585

8686
fs.copySync(imageIOFile, output)
8787

config/browser-test.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
'itk': {
3-
imageIOsPath: '/itkImageIOs',
4-
webWorkersPath: '/itkWebWorkers'
3+
imageIOsPath: '/ImageIOs',
4+
webWorkersPath: '/WebWorkers'
55
}
66
}

config/default.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
const path = require('path')
22
let config = {
33
'itk': {
4-
imageIOsPath: path.resolve(__dirname, '..', 'dist', 'itkImageIOs'),
5-
webWorkersPath: path.resolve(__dirname, '..', 'dist', 'itkWebWorkers')
4+
imageIOsPath: path.resolve(__dirname, '..', 'dist', 'ImageIOs'),
5+
webWorkersPath: path.resolve(__dirname, '..', 'dist', 'WebWorkers')
66
}
77
}
88

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ foreach(io_module ${BridgeJavaScript_IOModules})
2020
)
2121
set_property(TARGET ${target}
2222
PROPERTY RUNTIME_OUTPUT_DIRECTORY
23-
${BridgeJavaScript_BINARY_DIR}/itkImageIOs
23+
${BridgeJavaScript_BINARY_DIR}/ImageIOs
2424
)
2525
set_property(SOURCE ${target}.cxx APPEND
2626
PROPERTY OBJECT_DEPENDS
File renamed without changes.

src/itkImage.js renamed to src/Image.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const ImageType = require('./itkImageType.js')
2-
const Matrix = require('./itkMatrix.js')
1+
const ImageType = require('./ImageType.js')
2+
const Matrix = require('./Matrix.js')
33

44
const Image = function (imageType = new ImageType()) {
55
this.imageType = imageType
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const IntTypes = require('./itkIntTypes.js')
2-
const PixelTypes = require('./itkPixelTypes.js')
1+
const IntTypes = require('./IntTypes.js')
2+
const PixelTypes = require('./PixelTypes.js')
33

44
const ImageType = function (dimension = 2,
55
componentType = IntTypes.UInt8,
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)